From 6deaddee6daec0ce929d807b030f83e905841e6a Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 16 May 2021 11:01:30 -0400 Subject: [PATCH] Don't fail if status_code doesn't exist on startup --- jellyfin_kodi/connect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jellyfin_kodi/connect.py b/jellyfin_kodi/connect.py index 6fad39b9..5c838fb0 100644 --- a/jellyfin_kodi/connect.py +++ b/jellyfin_kodi/connect.py @@ -118,7 +118,7 @@ class Connect(object): if 'ExchangeToken' not in state['Servers'][0]: self.login() - elif state['State'] == CONNECTION_STATE['Unavailable'] and state['Status_Code'] == 401: + elif state['State'] == CONNECTION_STATE['Unavailable'] and state.get('Status_Code', 0) == 401: # If the saved credentials don't work, restart the addon to force the password dialog to open window('jellyfin.restart', clear=True)