mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-11 18:56:13 +00:00
Rework full sync into a context
This commit is contained in:
parent
f9db3c6134
commit
7e7cf1489d
4 changed files with 161 additions and 109 deletions
|
@ -21,7 +21,6 @@ from database import reset, get_sync, Database, emby_db, get_credentials
|
|||
from objects import Objects, Actions
|
||||
from downloader import TheVoid
|
||||
from helper import _, event, settings, window, dialog, api, JSONRPC
|
||||
from emby import Emby
|
||||
|
||||
#################################################################################################
|
||||
|
||||
|
|
|
@ -361,7 +361,9 @@ class Service(xbmc.Monitor):
|
|||
libraries = data['Id'].split(',')
|
||||
|
||||
for lib in libraries:
|
||||
self.library_thread.remove_library(lib)
|
||||
|
||||
if not self.library_thread.remove_library(lib):
|
||||
return
|
||||
|
||||
self.library_thread.add_library(data['Id'])
|
||||
xbmc.executebuiltin("Container.Refresh")
|
||||
|
@ -370,7 +372,9 @@ class Service(xbmc.Monitor):
|
|||
libraries = data['Id'].split(',')
|
||||
|
||||
for lib in libraries:
|
||||
self.library_thread.remove_library(lib)
|
||||
|
||||
if not self.library_thread.remove_library(lib):
|
||||
return
|
||||
|
||||
xbmc.executebuiltin("Container.Refresh")
|
||||
|
||||
|
@ -473,8 +477,6 @@ class Service(xbmc.Monitor):
|
|||
''' Reload objects which depends on the patch module.
|
||||
This allows to see the changes in code without restarting the python interpreter.
|
||||
'''
|
||||
import full_sync
|
||||
|
||||
reload_modules = ['objects.movies', 'objects.musicvideos', 'objects.tvshows',
|
||||
'objects.music', 'objects.obj', 'objects.actions', 'objects.kodi.kodi',
|
||||
'objects.kodi.movies', 'objects.kodi.musicvideos', 'objects.kodi.tvshows',
|
||||
|
@ -487,7 +489,6 @@ class Service(xbmc.Monitor):
|
|||
reload(objects.kodi)
|
||||
reload(objects)
|
||||
reload(library)
|
||||
reload(full_sync)
|
||||
reload(monitor)
|
||||
|
||||
LOG.warn("---[ objects reloaded ]")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue