mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Fix server migration error
This commit is contained in:
parent
60d17d4df7
commit
9b6886ac4a
2 changed files with 9 additions and 5 deletions
|
@ -70,8 +70,8 @@ class ConnectManager(object):
|
||||||
window('emby_state.json', value=self.state)
|
window('emby_state.json', value=self.state)
|
||||||
return self.state
|
return self.state
|
||||||
|
|
||||||
def get_server(self, server):
|
def get_server(self, server, options={}):
|
||||||
self.state = self._connect.connectToAddress(server)
|
self.state = self._connect.connectToAddress(server, options)
|
||||||
return self.get_state()
|
return self.get_state()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
@ -79,10 +79,14 @@ class InitialSetup(object):
|
||||||
if settings('server') == "":
|
if settings('server') == "":
|
||||||
current_server = self.user_client.get_server()
|
current_server = self.user_client.get_server()
|
||||||
if current_server is not None:
|
if current_server is not None:
|
||||||
server = self.connectmanager.get_server(current_server)
|
server = self.connectmanager.get_server(current_server,
|
||||||
|
{'ssl': self.user_client.get_ssl()})
|
||||||
log.info("Detected: %s", server)
|
log.info("Detected: %s", server)
|
||||||
server_id = server['Servers'][0]['Id']
|
try:
|
||||||
settings('serverId', value=server_id)
|
server_id = server['Servers'][0]['Id']
|
||||||
|
settings('serverId', value=server_id)
|
||||||
|
except Exception as error:
|
||||||
|
log.error(error)
|
||||||
log.info("server migration completed")
|
log.info("server migration completed")
|
||||||
|
|
||||||
self.user_client.get_userid()
|
self.user_client.get_userid()
|
||||||
|
|
Loading…
Reference in a new issue