From 49ce9e4359a774b3345eff0cbb8fe56a7ef4ff2a Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 14 Dec 2020 22:34:23 -0500 Subject: [PATCH] Don't crash when a user skips server setup --- jellyfin_kodi/entrypoint/default.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jellyfin_kodi/entrypoint/default.py b/jellyfin_kodi/entrypoint/default.py index 8a97c887..2e002d06 100644 --- a/jellyfin_kodi/entrypoint/default.py +++ b/jellyfin_kodi/entrypoint/default.py @@ -58,10 +58,10 @@ class Events(object): api_client = jellyfin_client.jellyfin addon_data = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/data.json") - with open(addon_data, 'rb') as infile: - data = json.load(infile) - try: + with open(addon_data, 'rb') as infile: + data = json.load(infile) + server_data = data['Servers'][0] api_client.config.data['auth.server'] = server_data.get('address') api_client.config.data['auth.server-name'] = server_data.get('Name')