From 97a4e4d4e63d437bc7673ece3383a4b7c1d07c39 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 22 Sep 2018 16:43:32 -0500 Subject: [PATCH] Fix artwork --- resources/lib/helper/api.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/lib/helper/api.py b/resources/lib/helper/api.py index 8bfa064a..b82ccaa3 100644 --- a/resources/lib/helper/api.py +++ b/resources/lib/helper/api.py @@ -258,10 +258,11 @@ class API(object): all_artwork['Backdrop'] = self.get_backdrops(obj['Id'], obj['BackdropTags'] or [], query) - for artwork in obj['Tags'] or []: - all_artwork[artwork] = self.get_artwork(obj['Id'], artwork, obj['Tags'][artwork]) + for artwork in (obj['Tags'] or []): + all_artwork[artwork] = self.get_artwork(obj['Id'], artwork, obj['Tags'][artwork], query) if parent_info: + if not all_artwork['Backdrop'] and obj['ParentBackdropId']: all_artwork['Backdrop'] = self.get_backdrops(obj['ParentBackdropId'], obj['ParentBackdropTags'], query) @@ -291,7 +292,7 @@ class API(object): for index, tag in enumerate(tags): - artwork = "%s/emby/Items/%s/Images/Backdrop/%s?Format=original&Tag=%s%s" % (self.server, item_id, index, tag, query or "") + artwork = "%s/emby/Items/%s/Images/Backdrop/%s?Format=original&Tag=%s%s" % (self.server, item_id, index, tag, (query or "")) backdrops.append(artwork) return backdrops