mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Fix server detection
In the event the connect module encountered an issue
This commit is contained in:
parent
0ed6c8e2b0
commit
d58763504a
1 changed files with 10 additions and 9 deletions
|
@ -99,16 +99,17 @@ class InitialSetup(object):
|
|||
# Failed to identify server
|
||||
return True
|
||||
|
||||
for server in current_state['Servers']:
|
||||
if server['Id'] == settings('serverId'):
|
||||
# Update token
|
||||
server['UserId'] = settings('userId') or None
|
||||
server['AccessToken'] = settings('token') or None
|
||||
self.connectmanager.update_token(current_state['Servers'], server)
|
||||
elif 'Servers' in current_state:
|
||||
for server in current_state['Servers']:
|
||||
if server['Id'] == settings('serverId'):
|
||||
# Update token
|
||||
server['UserId'] = settings('userId') or None
|
||||
server['AccessToken'] = settings('token') or None
|
||||
self.connectmanager.update_token(current_state['Servers'], server)
|
||||
|
||||
server_address = self.connectmanager.get_address(server)
|
||||
self._set_server(server_address, server)
|
||||
log.info("Found server!")
|
||||
server_address = self.connectmanager.get_address(server)
|
||||
self._set_server(server_address, server)
|
||||
log.info("Found server!")
|
||||
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in a new issue