Skip to content

Commit

Permalink
Make sure cover_url is always set (bug 1978)
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Dec 17, 2014
1 parent a8d470f commit edbe650
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gpodder/model.py
Expand Up @@ -1015,15 +1015,14 @@ def _consume_custom_feed(self, custom_feed, max_episodes=0):

def _consume_updated_feed(self, feed, max_episodes=0):
# Cover art URL
cover_url = None
if hasattr(feed.feed, 'image'):
for attribute in ('href', 'url'):
new_value = getattr(feed.feed.image, attribute, None)
if new_value is not None:
cover_url = new_value
elif hasattr(feed.feed, 'icon'):
cover_url = feed.feed.icon
else:
cover_url = None

# Payment URL (Flattr auto-payment) information
payment_info = [link['href'] for link in feed.feed.get('links', [])
Expand Down

0 comments on commit edbe650

Please sign in to comment.