Fix empty mimetype in feeds (Maemo bug 10036)

This commit is contained in:
Thomas Perl 2010-04-29 13:04:16 +02:00
parent aacd971d93
commit 5756e9791c

View file

@ -698,6 +698,11 @@ class PodcastEpisode(PodcastModelObject):
# Enclosures
for e in entry.get('enclosures', ()):
episode.mimetype = e.get('type', 'application/octet-stream')
if episode.mimetype == '':
# See Maemo bug 10036
log('Fixing empty mimetype in ugly feed', sender=episode)
episode.mimetype = 'application/octet-stream'
if '/' not in episode.mimetype:
continue