From 981e05e2b91ad02a3591ead1ddea505e0ad17224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Fri, 29 May 2020 01:22:10 +0200 Subject: [PATCH] Fix server selection list to show multiple servers --- jellyfin_kodi/connect.py | 13 +++++++------ jellyfin_kodi/jellyfin/credentials.py | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/jellyfin_kodi/connect.py b/jellyfin_kodi/connect.py index 641d1f5d..7576b9de 100644 --- a/jellyfin_kodi/connect.py +++ b/jellyfin_kodi/connect.py @@ -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(): diff --git a/jellyfin_kodi/jellyfin/credentials.py b/jellyfin_kodi/jellyfin/credentials.py index 711863de..e52bdee8 100644 --- a/jellyfin_kodi/jellyfin/credentials.py +++ b/jellyfin_kodi/jellyfin/credentials.py @@ -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']: