Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions headphones/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def get_image_links(self, ArtistID=None, AlbumID=None):
return

try:
image_url = data['artist']['image'][-1]['#text']
image_url = data['artist']['image'][-2]['#text']
except (KeyError, IndexError):
logger.debug('No artist image found')
image_url = None
Expand All @@ -235,7 +235,7 @@ def get_image_links(self, ArtistID=None, AlbumID=None):
return

try:
image_url = data['album']['image'][-1]['#text']
image_url = data['album']['image'][-2]['#text']
except (KeyError, IndexError):
logger.debug('No album image found on last.fm')
image_url = None
Expand Down Expand Up @@ -304,7 +304,7 @@ def _update_cache(self):
logger.debug('No artist bio found')
self.info_content = None
try:
image_url = data['artist']['image'][-1]['#text']
image_url = data['artist']['image'][-2]['#text']
except KeyError:
logger.debug('No artist image found')
image_url = None
Expand Down Expand Up @@ -342,7 +342,7 @@ def _update_cache(self):
logger.debug('No album infomation found')
self.info_content = None
try:
image_url = data['album']['image'][-1]['#text']
image_url = data['album']['image'][-2]['#text']
except KeyError:
logger.debug('No album image link found')
image_url = None
Expand Down