mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Revert "Revert "Retrying retrieving sessionId""
This reverts commit 585b1ac64e
.
This commit is contained in:
parent
585b1ac64e
commit
696586e952
1 changed files with 13 additions and 0 deletions
|
@ -84,6 +84,19 @@ class DownloadUtils():
|
||||||
except:
|
except:
|
||||||
self.logMsg("Posted capabilities failed.")
|
self.logMsg("Posted capabilities failed.")
|
||||||
|
|
||||||
|
# Attempt at getting sessionId
|
||||||
|
url = "{server}/mediabrowser/Sessions?DeviceId=%s&format=json" % deviceId
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = self.downloadUrl(url)
|
||||||
|
self.logMsg("Session: %s" % result, 2)
|
||||||
|
|
||||||
|
sessionId = result[0][u'Id']
|
||||||
|
self.logMsg("SessionId: %s" % sessionId)
|
||||||
|
self.WINDOW.setProperty("sessionId%s" % self.username, sessionId)
|
||||||
|
except:
|
||||||
|
self.logMsg("Failed to retrieve sessionId.", 1)
|
||||||
|
|
||||||
def startSession(self):
|
def startSession(self):
|
||||||
|
|
||||||
self.deviceId = self.clientInfo.getMachineId()
|
self.deviceId = self.clientInfo.getMachineId()
|
||||||
|
|
Loading…
Reference in a new issue