Fix extra fanart

This commit is contained in:
angelblue05 2018-09-15 16:26:20 -05:00
parent 8d816414b8
commit 556a6e4f8e

View file

@ -346,15 +346,15 @@ def get_fanart(item_id, path, server_id=None):
LOG.info("[ extra fanart ] %s", item_id) LOG.info("[ extra fanart ] %s", item_id)
objects = Objects() objects = Objects()
list_li = [] list_li = []
API = api.API(item, TheVoid('GetServerAddress', {'ServerId': server_id}).get())
directory = xbmc.translatePath("special://thumbnails/emby/%s/" % item_id).decode('utf-8') directory = xbmc.translatePath("special://thumbnails/emby/%s/" % item_id).decode('utf-8')
server = TheVoid('GetServerAddress', {'ServerId': server_id}).get()
if not xbmcvfs.exists(directory): if not xbmcvfs.exists(directory):
xbmcvfs.mkdirs(directory) xbmcvfs.mkdirs(directory)
item = TheVoid('GetItem', {'ServerId': server_id, 'Id': item_id}).get() item = TheVoid('GetItem', {'ServerId': server_id, 'Id': item_id}).get()
obj = objects.map(item, 'Artwork') obj = objects.map(item, 'Artwork')
backdrops = API.get_all_artwork(obj) backdrops = api.API(item, server).get_all_artwork(obj)
tags = obj['BackdropTags'] tags = obj['BackdropTags']
for index, backdrop in enumerate(backdrops): for index, backdrop in enumerate(backdrops):