Skip to content

Commit

Permalink
Media RSS: Get filesize and duration (bug 1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Nov 12, 2011
1 parent 85ea863 commit 1b0dc1a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gpodder/model.py
Expand Up @@ -272,10 +272,15 @@ def calculate_preference_value(enclosure):
continue

try:
episode.file_size = int(m.fileSize) or -1
episode.file_size = int(m.get('filesize', 0)) or -1
except:
episode.file_size = -1

try:
episode.total_time = int(m.get('duration', 0)) or 0
except:
episode.total_time = 0

return episode

# Brute-force detection of any links
Expand Down

0 comments on commit 1b0dc1a

Please sign in to comment.