mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-13 19:56:14 +00:00
Remember sync position for manual triggers
Allow to resume sync on restart for manual user triggers (update, repair). Automatically refresh boxsets if movie library is selected. use waitForAbort and emby_should_stop prop to terminate threads
This commit is contained in:
parent
00ee891952
commit
11f771ade2
9 changed files with 54 additions and 28 deletions
|
@ -46,7 +46,7 @@ class HTTP(object):
|
|||
return
|
||||
|
||||
try:
|
||||
LOG.warn("Closing session %s", id(self.session))
|
||||
LOG.warn("--<[ session/%s ]", id(self.session))
|
||||
self.session.close()
|
||||
except Exception as error:
|
||||
LOG.warn("The requests session could not be terminated: %s", error)
|
||||
|
|
|
@ -7,6 +7,8 @@ import logging
|
|||
import threading
|
||||
import time
|
||||
|
||||
import xbmc
|
||||
|
||||
from ..resources import websocket
|
||||
|
||||
##################################################################################################
|
||||
|
@ -46,6 +48,7 @@ class WSClient(threading.Thread):
|
|||
|
||||
def run(self):
|
||||
|
||||
monitor = xbmc.Monitor()
|
||||
token = self.client['config/auth.token']
|
||||
device_id = self.client['config/app.device_id']
|
||||
server = self.client['config/auth.server']
|
||||
|
@ -63,8 +66,8 @@ class WSClient(threading.Thread):
|
|||
|
||||
self.wsc.run_forever(ping_interval=10)
|
||||
|
||||
if not self.stop:
|
||||
time.sleep(5)
|
||||
if not self.stop and monitor.waitForAbort(5):
|
||||
break
|
||||
|
||||
LOG.info("---<[ websocket ]")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue