Fix server migration error

This commit is contained in:
angelblue05 2016-10-20 03:50:26 -05:00
parent 60d17d4df7
commit 9b6886ac4a
2 changed files with 9 additions and 5 deletions

View file

@ -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

View file

@ -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)
try:
server_id = server['Servers'][0]['Id'] server_id = server['Servers'][0]['Id']
settings('serverId', value=server_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()