Handle revoked token
This commit is contained in:
parent
6cb5fd12a1
commit
4b9cae3f2f
2 changed files with 5 additions and 1 deletions
|
@ -268,6 +268,7 @@ class DownloadUtils():
|
||||||
# Tell UserClient token has been revoked.
|
# Tell UserClient token has been revoked.
|
||||||
WINDOW.setProperty("Server_status", "401")
|
WINDOW.setProperty("Server_status", "401")
|
||||||
self.logMsg("HTTP Error: %s" % e, 0)
|
self.logMsg("HTTP Error: %s" % e, 0)
|
||||||
|
xbmcgui.Dialog().notification("Error connecting", "Unauthorized.", xbmcgui.NOTIFICATION_ERROR)
|
||||||
|
|
||||||
elif (r.status_code == 301) or (r.status_code == 302):
|
elif (r.status_code == 301) or (r.status_code == 302):
|
||||||
# Redirects
|
# Redirects
|
||||||
|
|
|
@ -43,7 +43,10 @@ class PlaybackUtils():
|
||||||
userid = WINDOW.getProperty('userId%s' % username)
|
userid = WINDOW.getProperty('userId%s' % username)
|
||||||
server = WINDOW.getProperty('server%s' % username)
|
server = WINDOW.getProperty('server%s' % username)
|
||||||
|
|
||||||
|
try:
|
||||||
id = result["Id"]
|
id = result["Id"]
|
||||||
|
except:
|
||||||
|
return
|
||||||
|
|
||||||
userData = result['UserData']
|
userData = result['UserData']
|
||||||
resume_result = 0
|
resume_result = 0
|
||||||
|
|
Loading…
Reference in a new issue