mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Fix for dialog error when 401
This commit is contained in:
parent
67e2256c62
commit
efd6b95408
1 changed files with 6 additions and 3 deletions
|
@ -313,17 +313,20 @@ class DownloadUtils():
|
||||||
if r.headers['X-Application-Error-Code'] == "ParentalControl":
|
if r.headers['X-Application-Error-Code'] == "ParentalControl":
|
||||||
# Parental control - access restricted
|
# Parental control - access restricted
|
||||||
WINDOW.setProperty("Server_status", "restricted")
|
WINDOW.setProperty("Server_status", "restricted")
|
||||||
xbmcgui.Dialog().notification("Emby server", "Access restricted.", xbmcgui.NOTIFICATION_ERROR, icon="special://home/addons/plugin.video.emby/icon.png", time=5000)
|
xbmcgui.Dialog().notification("Emby server", "Access restricted.", xbmcgui.NOTIFICATION_ERROR, time=5000)
|
||||||
return False
|
return False
|
||||||
|
elif r.headers['X-Application-Error-Code'] == "UnauthorizedAccessException":
|
||||||
|
# User tried to do something his emby account doesn't allow - admin restricted in some way
|
||||||
|
pass
|
||||||
|
|
||||||
if (status == "401") or (status == "Auth"):
|
elif (status == "401") or (status == "Auth"):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# 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, icon="special://home/addons/plugin.video.emby/icon.png")
|
xbmcgui.Dialog().notification("Error connecting", "Unauthorized.", xbmcgui.NOTIFICATION_ERROR)
|
||||||
return 401
|
return 401
|
||||||
|
|
||||||
elif (r.status_code == 301) or (r.status_code == 302):
|
elif (r.status_code == 301) or (r.status_code == 302):
|
||||||
|
|
Loading…
Reference in a new issue