Merge pull request #525 from mcarlton00/status-code-error

Don't fail if status_code doesn't exist on startup
This commit is contained in:
Odd Stråbø 2021-05-28 15:12:12 +02:00 committed by GitHub
commit 51c14b3fb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ class Connect(object):
if 'ExchangeToken' not in state['Servers'][0]: if 'ExchangeToken' not in state['Servers'][0]:
self.login() 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 # If the saved credentials don't work, restart the addon to force the password dialog to open
window('jellyfin.restart', clear=True) window('jellyfin.restart', clear=True)