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 = {}
dialog = ServerConnect("script-jellyfin-connect-server.xml", *XML_PATH)
dialog.set_args(**{
'connect_manager': self.connect_manager,
'username': user.get('DisplayName', ""),
'user_image': user.get('ImageUrl'),
'servers': state.get('Servers', [])
})
dialog.set_args(
connect_manager=self.connect_manager,
username=user.get('DisplayName', ""),
user_image=user.get('ImageUrl'),
servers=self.connect_manager.get_available_servers()
)
dialog.doModal()
if dialog.is_server_selected():

View File

@ -76,7 +76,7 @@ class Credentials(object):
raise KeyError("Server['Id'] cannot be null or empty")
# 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:
if existing['Id'] == server['Id']: