mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Accidentally erased method
This commit is contained in:
parent
ff00c35b5b
commit
4d7991ab5f
1 changed files with 20 additions and 0 deletions
|
@ -317,6 +317,26 @@ class ConnectionManager(object):
|
||||||
else:
|
else:
|
||||||
return server
|
return server
|
||||||
|
|
||||||
|
def onAuthenticated(self, result, options={}):
|
||||||
|
|
||||||
|
credentials = self.credentialProvider.getCredentials()
|
||||||
|
for s in credentials['Servers']:
|
||||||
|
if s['Id'] == result['ServerId']:
|
||||||
|
server = s
|
||||||
|
break
|
||||||
|
else: # Server not found?
|
||||||
|
return
|
||||||
|
|
||||||
|
if options.get('updateDateLastAccessed') is not False:
|
||||||
|
server['DateLastAccessed'] = datetime.now().strftime('%Y-%m-%dT%H:%M:%SZ')
|
||||||
|
|
||||||
|
server['UserId'] = result['User']['Id']
|
||||||
|
server['AccessToken'] = result['AccessToken']
|
||||||
|
|
||||||
|
self.credentialProvider.addOrUpdateServer(credentials['Servers'], server)
|
||||||
|
self._saveUserInfoIntoCredentials(server, result['User'])
|
||||||
|
self.credentialProvider.getCredentials(credentials)
|
||||||
|
|
||||||
def _tryConnect(self, url, timeout=None):
|
def _tryConnect(self, url, timeout=None):
|
||||||
|
|
||||||
url = self.getEmbyServerUrl(url, "system/info/public")
|
url = self.getEmbyServerUrl(url, "system/info/public")
|
||||||
|
|
Loading…
Reference in a new issue