mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-22 07:52:46 +00:00
Fix crash when sleeping/waking up device
This commit is contained in:
parent
e97a3a616d
commit
793bd66554
4 changed files with 25 additions and 4 deletions
17
service.py
17
service.py
|
@ -231,7 +231,21 @@ class Service():
|
|||
sound=False)
|
||||
|
||||
self.server_online = False
|
||||
|
||||
|
||||
elif window('emby_online') == "sleep":
|
||||
# device going to sleep
|
||||
if self.websocket_running:
|
||||
log("Stop websocket thread")
|
||||
ws.stopClient()
|
||||
ws = wsc.WebSocket_Client()
|
||||
self.websocket_running = False
|
||||
|
||||
if self.library_running:
|
||||
log("Stop library thread")
|
||||
library.stopThread()
|
||||
library = librarysync.LibrarySync()
|
||||
self.library_running = False
|
||||
|
||||
else:
|
||||
# Server is online
|
||||
if not self.server_online:
|
||||
|
@ -254,6 +268,7 @@ class Service():
|
|||
|
||||
# Start the userclient thread
|
||||
if not self.userclient_running:
|
||||
log("Start user thread")
|
||||
self.userclient_running = True
|
||||
user.start()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue