nextcloud-gpodder icon indicating copy to clipboard operation
nextcloud-gpodder copied to clipboard

Avoid multiple entires for same podcast

Open nikolas-digitalBabylon opened this issue 1 year ago • 4 comments

Hi,

currently multiple subscriptions for the same podcast are possible, causing a mess when multiple clients sync. This should be ideally avoided.

  • Some podcast entries are there multiple times because the url in one case ends with a trailing "/" while in the other case not.

  • In some other cases, the url is with "https" , while in other case simply with "http". These cases would be simple to fix, by comparing the URLS in a bit more sophisticated way, rather than simple string-matching.

  • The tricky part is that the podcasts themselves are retrieved by multiple sources, so de-duplication can be harder. For such cases, one strategy could be by examining the podcast webpage url inside, as provided in the rss feed. Each podcast should have its own webpage. Should the podcast webpage for a new subscription matches the webpage url of an existing, asking the user to confirm if the 2 subscriptions are the same and if user wants to replace/keep both, would make lots of sense. EDIT: I understand that the dialogue withe the user is up to the podcast app and not gpodder, but just saying from user's perspective...

nikolas-digitalBabylon avatar Jun 09 '24 14:06 nikolas-digitalBabylon

Hi,

sorry for the late reply.

I also think that this is a problem. However, I don't think we can fix this without immensely altering the synchronization and moving far away from gpodder. Maybe some simple string matching with trailing slashes is possible, but everything else could probably lead to errors in the synchronization, I fear.

The only workaround that works at the moment is to align the subscriptions between podcast apps manually, I fear. E.g. in AntennaPod, you can edit the feed URL of podcasts to add/remove the trailing slash or so.

If you are interested in this topic: A new podcast synchronization spec is currently developed at https://openpodcastapi.org that should address all of these issues once it's stable.

JonOfUs avatar Nov 27 '24 23:11 JonOfUs

Hi, thanks for your response. Honestly speaking 2 of the 3 points can be easily fixed without impacting sync behavior/causing issues to clients.

  • trailing slashes can be fixed just by either always trimming it out, or always including it. most prog languages have some package to parse and uniformly handle. I am VeRy rusty with php, not my cup... :). Really, if the url only ends with a "/", just trim it. I cannot imagine an http lib from a client (from the podcast player side..) not being able to handle a request to https://my-amazing-podcast.com/podcast because it was expecting https://my-amazing-podcast.com/podcast/ .If that was the case, double entries would anyways break clients already. Once this is done, you can then use the url (which is not uniformed without trailing '/') to ensure subscriptions are unique.
  • once the urls are handled correctly, http/https can also be relatively easy.

Let me know if I miss something. If I were a bit familiar with the codebase and had some time myself would come with a pr, but... Thank you for considering my suggestions, appreciated.

nikolas-digitalBabylon avatar Nov 30 '24 09:11 nikolas-digitalBabylon

PRs welcome

thrillfall avatar Sep 11 '25 06:09 thrillfall

I tried to play a little to fix this issue but some website doesn't like at all to strip their slashes and in reverse adding a slash every-time cause issue with others. Same thing and even worst with http/https. I remember that I break some of my teeth on this with RePod when I tried to fix it by passing http request to the nextcloud server (like a proxy) to fix CRSF problem with http feed on https nextcloud because I was unable to get a full rule to get all feed the same way.

Frankly, I don't see any good solution. AntennaPod, that is a really old project, has the same issue and without a rethinking of how podcast federation works, this will continue to occur. Maybe OpenPodcast API will bring this to an end but I have not much time to invest on my own project nor for other sadly.

Good luck with this one :)

Xefir avatar Oct 13 '25 19:10 Xefir