RadioDownloader icon indicating copy to clipboard operation
RadioDownloader copied to clipboard

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

Open WVJaguar opened this issue 3 years ago • 4 comments

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.

WVJaguar avatar Nov 14 '22 22:11 WVJaguar

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?

ribbons avatar Nov 15 '22 19:11 ribbons

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

WVJaguar avatar Nov 17 '22 12:11 WVJaguar

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.

ribbons avatar Nov 17 '22 16:11 ribbons

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

Cheers...Robin

WVJaguar avatar Nov 18 '22 08:11 WVJaguar