AntennaPod icon indicating copy to clipboard operation
AntennaPod copied to clipboard

Easily share episode links

Open TSampley opened this issue 11 months ago • 14 comments
trafficstars

Description

Resolves #6723

Checklist

  • [x] I have read the contribution guidelines: https://github.com/AntennaPod/AntennaPod/blob/develop/CONTRIBUTING.md#submit-a-pull-request
  • [ ] I have performed a self-review of my code
  • [ ] I have run the automated code checks using ./gradlew checkstyle spotbugsPlayDebug spotbugsDebug :app:lintPlayDebug
  • [ ] My code follows the style guidelines of the AntennaPod project: https://github.com/AntennaPod/AntennaPod/wiki/Code-style
  • [ ] I have mentioned the corresponding issue and the relevant keyword (e.g., "Closes: #xy") in the description (see https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
  • [ ] If it is a core feature, I have added automated tests

TSampley avatar Dec 14 '24 19:12 TSampley

@ByteHamster so where were you expecting this new URL format to be used? Because it sounded like you did not want me to add a third/fourth sharing option. Should I add the additional parameters to the webpage url under "Social Message" or the media url under "Media Address"? Neither really makes sense to me because these parameters are meant to be used by AntennaPod, not the resource servers indicated by those URLs...

TSampley avatar Dec 14 '24 19:12 TSampley

@ByteHamster I'm thinking of adding a fourth share card with title "AntennaPod address" just below "Media address" with the new AntennaPod deeplink format.

TSampley avatar Dec 14 '24 20:12 TSampley

The address is a good fit for the social share method. This is because a direct link to a media file is not really a good social url (no player, some systems might be unable to play). Instead, the AntennaPod url allows for people to get a website with a proper preview. If AntennaPod is installed, it shows the app. For everyone else, it shows episode information on a proper page.

ByteHamster avatar Dec 15 '24 09:12 ByteHamster

This is because a direct link to a media file is not really a good social url (no player, some systems might be unable to play). Instead, the AntennaPod url allows for people to get a website with a proper preview.

So you want me to replace the media file link in the social share card with this new link format? Also, in my testing, I got a 404 from the AntennaPod website when trying to view the episode link in the same format as feed links.

TSampley avatar Dec 16 '24 00:12 TSampley

So you want me to replace the media file link in the social share card with this new link format?

Yes :) Maybe even replace the episode website. What do you think, @keunes?

Also, in my testing, I got a 404 from the AntennaPod website

Yeah, we later need to add support to the website as well.

ByteHamster avatar Dec 17 '24 20:12 ByteHamster

Hi, thanks for updating the PR. Could you please switch back to Java instead of Kotlin? Realistically, I'm the one who has to maintain this code in the future, and I'm more fluent in Java than in Kotlin.

ByteHamster avatar Mar 06 '25 16:03 ByteHamster

Hi @TSampley, are you still interested in this PR? :)

ByteHamster avatar Apr 10 '25 19:04 ByteHamster

I was but had been awaiting a response from @keunes I thought about

even replace the episode website.

Although removing the kotlin is a little discouraging...

TSampley avatar Apr 19 '25 23:04 TSampley

Hi @TSampley I'm so sorry. I can't find back what you were waiting for from my side. Can you remind me please?

keunes avatar Apr 20 '25 06:04 keunes

@keunes https://github.com/AntennaPod/AntennaPod/pull/7553#issuecomment-2549612086

TSampley avatar Apr 21 '25 05:04 TSampley

Hi @TSampley,

I'm so sorry for not replying earlier :-/ I also understood from @ByteHamster that closing this PR was done by accident. Would you be interested still in working on this further @TSampley?

We discussed it in the 'Needs decision' meeting today. The conclusions:

So you want me to replace the media file link in the social share card with this new link format?

Yes :) Maybe even replace the episode website. What do you think, @keunes?

Yes, the social media share message should only contain the AntennaPod link. That page then will have the relevant (OpenGraph) metadata and the user will get to see all relevant links on the website (including the episode website).

The share links that are created will need to contain a lot of info. To be exact:

To de-duplicate on the side, in order to open the correct episode when another user receives a link:

  • episode title
  • episode date
  • episode GUID
  • episode download URL

Plus:

  • feed URL (to subscribe as receiver of a link)
  • podcast website URL (to show on the website)
  • episode cover image URL (to show the image in social media messages and on the website)
    • when we update podcast sharing links in future we need the podcast cover image URL instead; we can share the same parameter name between the two
  • episode website URL (to show on the website)
  • playback position, if enabled (to show on the website and maybe start playback on relevant point)

We won't run into technical issues with the share link length. On social media, a long link is not a problem because links get a fixed character count and they get cropped in the UI. In messaging apps like Signal and Whatsapp, however, the links are usually not cropped so when shared in a message the message might get really really long. There are ways to work around that (e.g. show intermediary screen to share via specific apps, for which we can then create a short URL that's stored in a database). But that's an improvement that we can look into later.

CC: @ByteHamster @delthia

keunes avatar May 22 '25 09:05 keunes

This pull request has been mentioned on AntennaPod Forum. There might be relevant details there:

https://forum.antennapod.org/t/needs-decision-meeting-updates/4169/23

antennapod-bot avatar May 22 '25 09:05 antennapod-bot

This PR will be closed when we don't get a reply within 7 days.

github-actions[bot] avatar May 30 '25 02:05 github-actions[bot]

@keunes yes, I'm still interested in this ticket. I'll get back on it later today and check-in at the next week's meeting.

TSampley avatar Jun 05 '25 18:06 TSampley

Hi @TSampley, are you still interested in this PR? :) Would be great to get this merged, so that users can share nicer AntennaPod links.

ByteHamster avatar Jul 20 '25 08:07 ByteHamster

This PR will be closed when we don't get a reply within 7 days.

github-actions[bot] avatar Aug 11 '25 02:08 github-actions[bot]

No interest in working on outdated technologies or following bad practices.

TSampley avatar Aug 11 '25 02:08 TSampley