mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 01:36:11 +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
|
||||
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)
|
||||
additionalUsers = result[0]['AdditionalUsers']
|
||||
try:
|
||||
additionalUsers = result[0]['AdditionalUsers']
|
||||
except (KeyError, TypeError) as error:
|
||||
log.error(error)
|
||||
additionaluser = []
|
||||
|
||||
count = 0
|
||||
for additionaluser in additionalUsers:
|
||||
userid = additionaluser['UserId']
|
||||
|
|
Loading…
Reference in a new issue