Fallback to link if no guid exists (Maemo bug 12073)

This commit is contained in:
Thomas Perl 2011-04-01 14:12:23 +02:00
parent 753966e813
commit b425ce95e1

View file

@ -164,6 +164,9 @@ class PodcastEpisode(PodcastModelObject):
episode.description = entry.get('subtitle', '')
episode.guid = entry.get('id', '')
if not episode.guid:
# Fallback to the entry URL if there is no GUID
episode.guid = entry.get('link', '')
if entry.get('updated_parsed', None):
episode.published = rfc822.mktime_tz(entry.updated_parsed+(0,))