Catch bad passwords on addon startup

This commit is contained in:
Matt 2020-05-22 18:55:21 -04:00
parent 22b5d413fd
commit de95d23e5a
3 changed files with 13 additions and 3 deletions

View file

@ -119,6 +119,10 @@ class Connect(object):
if 'ExchangeToken' not in state['Servers'][0]:
self.login()
elif state['State'] == CONNECTION_STATE['Unavailable'] and state['Status_Code'] == 401:
# If the saved credentials don't work, restart the addon to force the password dialog to open
window('jellyfin.restart', clear=True)
elif state['State'] == CONNECTION_STATE['Unavailable']:
raise HTTPException('ServerUnreachable', {})