ribbons / RadioDownloader

An easy to use application for managing podcast subscriptions and downloads.
https://nerdoftheherd.com/tools/radiodld/
GNU General Public License v3.0
15 stars 11 forks source link

Check that a given RSS feed contains at least one <enclosure> tag before allowing it to be added #253

Open WVJaguar opened 1 year ago

WVJaguar commented 1 year ago

I used the rss feed shown on the web page https://timharford.com/2006/09/rss-feed-of-undercover-economist/:

https://timharford.com/2006/09/rss-feed-of-undercover-economist/ (At the top of this page is: "This XML file does not appear to have any style information associated with it. The document tree is shown below.")

The subscription was accepted and appears in the list.

ribbons commented 1 year ago

Apologies if I'm missing something but the RSS feed linked on that page ( https://www.ft.com/undercover-economist?format=rss ) appears to be linking to written articles instead of being a podcast feed. As podcast feeds are just a kind of RSS feed which reference audio files it isn't completely surprising that Radio Downloader accepts it happily.

Perhaps Radio Downloader should check to see if a feed contains any audio enclosures before it accepts it as a valid podcast, what do you think?

WVJaguar commented 1 year ago

Thank you, Matt, for pointing out that articles are involved. How can I determine that audio files are involved from the source code?

Since Radio Downloader is all about audio, perhaps it should check.

Cheers...Robin

ribbons commented 1 year ago

A quick way to check would be to search for <enclosure in the feed XML as a podcast feed would always contain those tags. You can then look to see the contents to make sure they are audio files instead of video (although I'm guessing that video-only feeds aren't that common).

I'll re-purpose this issue to cover adding a check to see if a feed contains enclosure tags before allowing it to be added.

WVJaguar commented 1 year ago

Thank you, Matt. I will follow your advice in future.

Cheers...Robin