Fix server selection list to show multiple servers

This commit is contained in:
Odd Stråbø 2020-05-29 01:22:10 +02:00
parent 18374fc3c8
commit 981e05e2b9
2 changed files with 8 additions and 7 deletions

View file

@ -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():

View file

@ -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']: