Suspend threads when server goes offline

This commit is contained in:
tomkat83 2016-04-13 13:30:25 +02:00
parent 7830f49936
commit e41cf94cee

View file

@ -246,6 +246,8 @@ class Service():
if self.server_online:
log("Server is offline.", 1)
window('emby_online', value="false")
# Suspend threads
window('suspend_LibraryThread', value='true')
xbmcgui.Dialog().notification(
heading=lang(33001),
@ -274,6 +276,10 @@ class Service():
self.server_online = True
log("Server %s is online and ready." % server, 1)
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
if not self.userclient_running: