Merge pull request #307 from oddstr13/pr-serverlist-1

Fix server selection list to show multiple servers
This commit is contained in:
mcarlton00 2020-05-28 21:54:35 -04:00 committed by GitHub
commit 2eefb6f212
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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']: