Another follow up
Use a while loop instead.
This commit is contained in:
parent
8944012821
commit
de527327a5
2 changed files with 9 additions and 2 deletions
|
@ -269,7 +269,7 @@ 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)
|
xbmcgui.Dialog().notification("Emby server", "Access restricted.", xbmcgui.NOTIFICATION_ERROR, time=5000)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
elif (status == "401") or (status == "Auth"):
|
elif (status == "401") or (status == "Auth"):
|
||||||
|
|
|
@ -145,11 +145,18 @@ class Service():
|
||||||
break
|
break
|
||||||
#WebSocketThread().processPendingActions()
|
#WebSocketThread().processPendingActions()
|
||||||
else:
|
else:
|
||||||
user.hasAccess()
|
|
||||||
if self.warn_auth:
|
if self.warn_auth:
|
||||||
self.logMsg("Not authenticated yet.", 1)
|
self.logMsg("Not authenticated yet.", 1)
|
||||||
self.warn_auth = False
|
self.warn_auth = False
|
||||||
|
|
||||||
|
while user.HasAccess == False:
|
||||||
|
user.hasAccess()
|
||||||
|
if self.KodiMonitor.waitForAbort(5):
|
||||||
|
# Abort was requested while waiting. We should exit
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Wait until server becomes online or shut down is requested
|
# Wait until server becomes online or shut down is requested
|
||||||
while not self.KodiMonitor.abortRequested():
|
while not self.KodiMonitor.abortRequested():
|
||||||
|
|
Loading…
Reference in a new issue