fetchart: Tolerate itunes bugs (fix #1109)

This commit is contained in:
Adrian Sampson 2014-11-22 15:32:20 -08:00
parent 9121e2ad71
commit d026e7742b

View file

@ -168,7 +168,13 @@ def itunes_art(album):
"""
search_string = (album.albumartist + ' ' + album.album).encode('utf-8')
try:
itunes_album = itunes.search_album(search_string)[0]
# Isolate bugs in the iTunes library while searching.
try:
itunes_album = itunes.search_album(search_string)[0]
except Exception as exc:
log.debug('fetchart: iTunes search failed: {0}'.format(exc))
return
if itunes_album.get_artwork()['100']:
small_url = itunes_album.get_artwork()['100']
big_url = small_url.replace('100x100', '1200x1200')