mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Merge pull request #307 from oddstr13/pr-serverlist-1
Fix server selection list to show multiple servers
This commit is contained in:
commit
2eefb6f212
2 changed files with 8 additions and 7 deletions
|
@ -159,12 +159,13 @@ class Connect(object):
|
||||||
user = {}
|
user = {}
|
||||||
|
|
||||||
dialog = ServerConnect("script-jellyfin-connect-server.xml", *XML_PATH)
|
dialog = ServerConnect("script-jellyfin-connect-server.xml", *XML_PATH)
|
||||||
dialog.set_args(**{
|
dialog.set_args(
|
||||||
'connect_manager': self.connect_manager,
|
connect_manager=self.connect_manager,
|
||||||
'username': user.get('DisplayName', ""),
|
username=user.get('DisplayName', ""),
|
||||||
'user_image': user.get('ImageUrl'),
|
user_image=user.get('ImageUrl'),
|
||||||
'servers': state.get('Servers', [])
|
servers=self.connect_manager.get_available_servers()
|
||||||
})
|
)
|
||||||
|
|
||||||
dialog.doModal()
|
dialog.doModal()
|
||||||
|
|
||||||
if dialog.is_server_selected():
|
if dialog.is_server_selected():
|
||||||
|
|
|
@ -76,7 +76,7 @@ class Credentials(object):
|
||||||
raise KeyError("Server['Id'] cannot be null or empty")
|
raise KeyError("Server['Id'] cannot be null or empty")
|
||||||
|
|
||||||
# Add default DateLastAccessed if doesn't exist.
|
# Add default DateLastAccessed if doesn't exist.
|
||||||
server.setdefault('DateLastAccessed', "2001-01-01T00:00:00Z")
|
server.setdefault('DateLastAccessed', "1970-01-01T00:00:00Z")
|
||||||
|
|
||||||
for existing in servers:
|
for existing in servers:
|
||||||
if existing['Id'] == server['Id']:
|
if existing['Id'] == server['Id']:
|
||||||
|
|
Loading…
Reference in a new issue