mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Catch error retrieving session
To review later
This commit is contained in:
parent
45378edbe8
commit
245b1ce9fa
1 changed files with 7 additions and 2 deletions
|
@ -364,9 +364,14 @@ def addUser():
|
||||||
break
|
break
|
||||||
window('EmbyAdditionalUserImage.%s' % i, clear=True)
|
window('EmbyAdditionalUserImage.%s' % i, clear=True)
|
||||||
|
|
||||||
url = "{server}/emby/Sessions?DeviceId=%s" % deviceId
|
url = "{server}/emby/Sessions?DeviceId=%s&format=json" % deviceId
|
||||||
result = doUtils.downloadUrl(url)
|
result = doUtils.downloadUrl(url)
|
||||||
|
try:
|
||||||
additionalUsers = result[0]['AdditionalUsers']
|
additionalUsers = result[0]['AdditionalUsers']
|
||||||
|
except (KeyError, TypeError) as error:
|
||||||
|
log.error(error)
|
||||||
|
additionaluser = []
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
for additionaluser in additionalUsers:
|
for additionaluser in additionalUsers:
|
||||||
userid = additionaluser['UserId']
|
userid = additionaluser['UserId']
|
||||||
|
|
Loading…
Reference in a new issue