Handle revoked token

This commit is contained in:
angelblue05 2015-05-03 02:24:23 -05:00
parent 6cb5fd12a1
commit 4b9cae3f2f
2 changed files with 5 additions and 1 deletions

View file

@ -268,6 +268,7 @@ class DownloadUtils():
# Tell UserClient token has been revoked.
WINDOW.setProperty("Server_status", "401")
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):
# Redirects

View file

@ -43,7 +43,10 @@ class PlaybackUtils():
userid = WINDOW.getProperty('userId%s' % username)
server = WINDOW.getProperty('server%s' % username)
id = result["Id"]
try:
id = result["Id"]
except:
return
userData = result['UserData']
resume_result = 0