mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-12 21:26:10 +00:00
Fixed connecting to server
This commit is contained in:
parent
66a4f381f4
commit
9f355989a6
1 changed files with 6 additions and 0 deletions
|
@ -407,6 +407,9 @@ class ConnectionManager(object):
|
||||||
|
|
||||||
connectServers = self._getConnectServers(credentials)
|
connectServers = self._getConnectServers(credentials)
|
||||||
foundServers = self._findServers(self._serverDiscovery())
|
foundServers = self._findServers(self._serverDiscovery())
|
||||||
|
if not connectServers or not foundServers: # back out right away, no point in continuing
|
||||||
|
log.info("Found no servers")
|
||||||
|
return []
|
||||||
|
|
||||||
servers = list(credentials['Servers'])
|
servers = list(credentials['Servers'])
|
||||||
self._mergeServers(servers, foundServers)
|
self._mergeServers(servers, foundServers)
|
||||||
|
@ -760,6 +763,9 @@ class ConnectionManager(object):
|
||||||
log.info("Begin connect")
|
log.info("Begin connect")
|
||||||
|
|
||||||
servers = self.getAvailableServers()
|
servers = self.getAvailableServers()
|
||||||
|
if not servers:
|
||||||
|
return ConnectionState['Unavailable']
|
||||||
|
|
||||||
return self._connectToServers(servers, options)
|
return self._connectToServers(servers, options)
|
||||||
|
|
||||||
def _connectToServers(self, servers, options):
|
def _connectToServers(self, servers, options):
|
||||||
|
|
Loading…
Reference in a new issue