Commit 2d6c6e67 authored by echel0n's avatar echel0n

Fixed TypeError for _retrieve_show_image

parent f9de00fd
...@@ -626,16 +626,12 @@ class GenericMetadata(object): ...@@ -626,16 +626,12 @@ class GenericMetadata(object):
return None return None
is_image_thumb = '_thumb' in image_type is_image_thumb = '_thumb' in image_type
image_types = {
try: '{}'.format(image_type): {
image_types = { 'indexer': lambda: t.images(show_obj.indexer_id, key_type=image_type.replace('_thumb', ''))[which][('filename', 'thumbnail')[is_image_thumb]],
'{}'.format(image_type): { 'fanart': lambda: self._retrieve_show_images_from_fanart(show_obj, image_type.replace('_thumb', ''), is_image_thumb)
'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']: for fname in ['indexer', 'fanart']:
try: try:
...@@ -644,7 +640,7 @@ class GenericMetadata(object): ...@@ -644,7 +640,7 @@ class GenericMetadata(object):
image_data = self.get_show_image(image_url) image_data = self.get_show_image(image_url)
if image_data: if image_data:
break break
except (KeyError, IndexError): except (KeyError, IndexError, TypeError) as e:
pass pass
return image_data 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