Suspend threads when server goes offline
This commit is contained in:
parent
7830f49936
commit
e41cf94cee
1 changed files with 6 additions and 0 deletions
|
@ -246,6 +246,8 @@ class Service():
|
||||||
if self.server_online:
|
if self.server_online:
|
||||||
log("Server is offline.", 1)
|
log("Server is offline.", 1)
|
||||||
window('emby_online', value="false")
|
window('emby_online', value="false")
|
||||||
|
# Suspend threads
|
||||||
|
window('suspend_LibraryThread', value='true')
|
||||||
|
|
||||||
xbmcgui.Dialog().notification(
|
xbmcgui.Dialog().notification(
|
||||||
heading=lang(33001),
|
heading=lang(33001),
|
||||||
|
@ -274,6 +276,10 @@ class Service():
|
||||||
self.server_online = True
|
self.server_online = True
|
||||||
log("Server %s is online and ready." % server, 1)
|
log("Server %s is online and ready." % server, 1)
|
||||||
window('emby_online', value="true")
|
window('emby_online', value="true")
|
||||||
|
if window('plex_authenticated') == 'true':
|
||||||
|
# Server got offline when we were authenticated.
|
||||||
|
# Hence resume threads
|
||||||
|
window('suspend_LibraryThread', clear=True)
|
||||||
|
|
||||||
# Start the userclient thread
|
# Start the userclient thread
|
||||||
if not self.userclient_running:
|
if not self.userclient_running:
|
||||||
|
|
Loading…
Reference in a new issue