Commit 2d6c6e67 authored by echel0n's avatar echel0n

Fixed TypeError for _retrieve_show_image

parent f9de00fd
......@@ -626,16 +626,12 @@ class GenericMetadata(object):
return None
is_image_thumb = '_thumb' in image_type
try:
image_types = {
'{}'.format(image_type): {
'indexer': lambda: t.images(show_obj.indexer_id, key_type=image_type.replace('_thumb', ''))[which][('filename', 'thumbnail')[is_image_thumb]],
'fanart': lambda: self._retrieve_show_images_from_fanart(show_obj, image_type.replace('_thumb', ''), is_image_thumb)
}
image_types = {
'{}'.format(image_type): {
'indexer': lambda: t.images(show_obj.indexer_id, key_type=image_type.replace('_thumb', ''))[which][('filename', 'thumbnail')[is_image_thumb]],
'fanart': lambda: self._retrieve_show_images_from_fanart(show_obj, image_type.replace('_thumb', ''), is_image_thumb)
}
except Exception as e:
return None
}
for fname in ['indexer', 'fanart']:
try:
......@@ -644,7 +640,7 @@ class GenericMetadata(object):
image_data = self.get_show_image(image_url)
if image_data:
break
except (KeyError, IndexError):
except (KeyError, IndexError, TypeError) as e:
pass
return image_data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment