mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-08-21 15:01:36 +00:00
a few more places we need to check for exceptions
This commit is contained in:
parent
4c9408b640
commit
f793f709ef
4 changed files with 37 additions and 16 deletions
|
@ -114,12 +114,13 @@ class DownloadUtils(object):
|
|||
|
||||
# Attempt at getting sessionId
|
||||
url = "{server}/emby/Sessions?DeviceId=%s&format=json" % device_id
|
||||
result = self.downloadUrl(url)
|
||||
|
||||
try:
|
||||
result = self.downloadUrl(url)
|
||||
session_id = result[0]['Id']
|
||||
|
||||
except (KeyError, TypeError):
|
||||
log.error("Failed to retrieve the session id.")
|
||||
except Exception as error:
|
||||
log.error("Failed to retrieve the session id: " + str(error))
|
||||
|
||||
else:
|
||||
log.info("SessionId: %s", session_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue