[gpodder-devel] File sanity check -- Is it really an mp3?

  • From: thp at perli.net (Thomas Perl)
  • Date: Mon, 26 Nov 2007 23:50:10 +0100

Hello, Andy!

apblist at speakeasy.net wrote:
> I only know of one podcast where this is a problem, but it's a weird one.
> 
> The "This American Life" podcast
> (http://feeds.thisamericanlife.org/talpodcast) claims to update at 7 PM
> Eastern on Sundays.  And it's true that the feed updates, but the mp3
> doesn't get posted until later.  So gpodder grabs a small HTML error
> file, and dutifully loads it onto my iPod, which, of course, doesn't
> play.

Does the feed return a 404 page or simply some static served
placeholder? I think this bug should be adressed by the podcast feed
author by simply not adding the enclosure tag to the RSS feed until the
file is available. gPodder already handles "mixed" podcasts (RSS feeds
with some items that don't have enclosures) gracefully by ignoring the
episodes without enclosure.

> It's minimal trouble to delete the file and redownload on Monday, but
> is there any kind of sanity check to make sure it's actually a playable
> file before loading?

What kind of sanity check do you expect? It would be hard to implement
sanity checks for all kinds of different media types, although it might
not be so difficult do implement checks for the most common types. After
all, it could theoretically be possible that a podcast has plain HTML
pages as enclosure, although this might not be a good use case :)

As far as the downloading goes, I think 404 errors are not "seen" by
gPodder, so we could try to intercept these and make the download fail.
Would this kind of solve your problem?

Again, best thing would be to talk to the podcast authors to fix their
podcasts, really.


Thomas


Other related posts: