gPodder Bug Tracker – Bug 1446
Extract size and duration from Media RSS' media:content
Last modified: 2011-11-12 13:59:24 GMT
The following feeds refer to the same podcast:
However, gPodder only picks up the episode size and duration before downloading on the podcast.xml feed. For the RSS feed, the Size column in the main window is blank until an episode is downloaded, and the duration is shown as (00:00) in the episode info box.
The podcast.xml feed contains this:
<enclosure url="http://download.guardian.co.uk/audio/kip/science/series/science/1317393644223/4352/gnl.sci.111003.jp.science_weekly.mp3" length="41559858" type="audio/mpeg" />
... but the /rss feed appears to contain only this:
<media:content duration="3462" fileSize="41559858" type="audio/mpeg" url="http://download.guardian.co.uk/audio/kip/science/series/science/1317393644223/4352/gnl.sci.111003.jp.science_weekly.mp3" />
It looks like ideally the same size and duration information could be picked up from the <media:content> node.
This is actually a very good idea, thanks for the detailed bug report. Planning for 3.1 (for now). Let's hope that feedparser exposes all this info (it should) in its API. Just to be sure: "duration" always refers to the duration in seconds, and fileSize always in bytes, or are there alternative representations (e.g. "12 MB" is valid for size, or "00:10" is valid for duration)? One should be able to find this in the Media RSS spec - if you can add this info here in the bug report, this would be immensely helpful by the time we get around to implementing this support
Both http://search.yahoo.com/mrss and http://www.rssboard.org/media-rss state the following for <media:content>:
"fileSize is the number of bytes of the media object. It is an optional attribute.
duration is the number of seconds the media object plays. It is an optional attribute."
Happily, it sounds like alternatives aren't permitted.
Implemented in Git, will be part of 3.0.1:
This patch not only adds support for media:content, but also fixes the filesize detection for Media RSS content, which was broken previously.