diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 588b8d3c..10d608ed 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -94,6 +94,7 @@ def doMainListing(): def addUser(): doUtils = downloadutils.DownloadUtils() + art = artwork.Artwork() clientInfo = clientinfo.ClientInfo() deviceId = clientInfo.getDeviceId() deviceName = clientInfo.getDeviceName() @@ -195,18 +196,19 @@ def addUser(): for i in range(totalNodes): if not utils.window('EmbyAdditionalUserImage.%s' % i): break - utils.window('EmbyAdditionalUserImage.%s' % i) + utils.window('EmbyAdditionalUserImage.%s' % i, clear=True) url = "{server}/emby/Sessions?DeviceId=%s" % deviceId result = doUtils.downloadUrl(url) additionalUsers = result[0]['AdditionalUsers'] count = 0 for additionaluser in additionalUsers: - url = "{server}/emby/Users/%s?format=json" % additionaluser['UserId'] + userid = additionaluser['UserId'] + url = "{server}/emby/Users/%s?format=json" % userid result = doUtils.downloadUrl(url) utils.window('EmbyAdditionalUserImage.%s' % count, - value=artwork.Artwork().getUserArtwork(result, 'Primary')) - utils.window('EmbyAdditionalUserPosition.%s' % additionaluser['UserId'], value=str(count)) + value=art.getUserArtwork(result['Id'], 'Primary')) + utils.window('EmbyAdditionalUserPosition.%s' % userid, value=str(count)) count +=1 ##### THEME MUSIC/VIDEOS ##### diff --git a/resources/lib/userclient.py b/resources/lib/userclient.py index a6562a53..035cf784 100644 --- a/resources/lib/userclient.py +++ b/resources/lib/userclient.py @@ -188,13 +188,14 @@ class UserClient(threading.Thread): def setUserPref(self): doUtils = self.doUtils + art = artwork.Artwork() url = "{server}/emby/Users/{UserId}?format=json" result = doUtils.downloadUrl(url) self.userSettings = result # Set user image for skin display if result.get('PrimaryImageTag'): - utils.window('EmbyUserImage', value=artwork.Artwork().getUserArtwork(result, 'Primary')) + utils.window('EmbyUserImage', value=art.getUserArtwork(result['Id'], 'Primary')) # Set resume point max url = "{server}/emby/System/Configuration?format=json"