Rename librarysync
This commit is contained in:
parent
4246711b1e
commit
842df1773f
3 changed files with 15 additions and 15 deletions
|
@ -53,7 +53,7 @@ def reload_pkc():
|
|||
for prop in WINDOW_PROPERTIES:
|
||||
utils.window(prop, clear=True)
|
||||
# Clear video nodes properties
|
||||
from .librarysync import videonodes
|
||||
from .library_sync import videonodes
|
||||
videonodes.VideoNodes().clearProperties()
|
||||
|
||||
# Initializing
|
||||
|
|
|
@ -9,7 +9,7 @@ from . import utils
|
|||
from . import userclient
|
||||
from . import initialsetup
|
||||
from . import kodimonitor
|
||||
from . import librarysync
|
||||
from . import sync
|
||||
from . import websocket_client
|
||||
from . import plex_companion
|
||||
from . import plex_functions as PF
|
||||
|
@ -34,13 +34,13 @@ class Service():
|
|||
|
||||
user = None
|
||||
ws = None
|
||||
library = None
|
||||
sync = None
|
||||
plexcompanion = None
|
||||
|
||||
user_running = False
|
||||
ws_running = False
|
||||
alexa_running = False
|
||||
library_running = False
|
||||
sync_running = False
|
||||
plexcompanion_running = False
|
||||
kodimonitor_running = False
|
||||
playback_starter_running = False
|
||||
|
@ -95,7 +95,7 @@ class Service():
|
|||
self.user = userclient.UserClient()
|
||||
self.ws = websocket_client.PMS_Websocket()
|
||||
self.alexa = websocket_client.Alexa_Websocket()
|
||||
self.library = librarysync.LibrarySync()
|
||||
self.sync = sync.Sync()
|
||||
self.plexcompanion = plex_companion.PlexCompanion()
|
||||
self.specialmonitor = kodimonitor.SpecialMonitor()
|
||||
self.playback_starter = playback_starter.PlaybackStarter()
|
||||
|
@ -149,9 +149,9 @@ class Service():
|
|||
self.alexa_running = True
|
||||
self.alexa.start()
|
||||
# Start the syncing thread
|
||||
if not self.library_running:
|
||||
self.library_running = True
|
||||
self.library.start()
|
||||
if not self.sync_running:
|
||||
self.sync_running = True
|
||||
self.sync.start()
|
||||
# Start the Plex Companion thread
|
||||
if not self.plexcompanion_running:
|
||||
self.plexcompanion_running = True
|
||||
|
|
|
@ -15,7 +15,7 @@ from . import itemtypes, plex_db, kodidb_functions as kodidb
|
|||
from . import artwork, plex_functions as PF
|
||||
from . import variables as v, state
|
||||
|
||||
LOG = getLogger('PLEX.librarysync')
|
||||
LOG = getLogger('PLEX.sync')
|
||||
|
||||
|
||||
def set_library_scan_toggle(boolean=True):
|
||||
|
@ -31,7 +31,7 @@ def set_library_scan_toggle(boolean=True):
|
|||
utils.window('plex_dbScan', value="true")
|
||||
|
||||
|
||||
class LibrarySync(backgroundthread.KillableThread):
|
||||
class Sync(backgroundthread.KillableThread):
|
||||
"""
|
||||
The one and only library sync thread. Spawn only 1!
|
||||
"""
|
||||
|
@ -54,7 +54,7 @@ class LibrarySync(backgroundthread.KillableThread):
|
|||
self.update_kodi_music_library = False
|
||||
# Lock used to wait on a full sync, e.g. on initial sync
|
||||
self.lock = backgroundthread.threading.Lock()
|
||||
super(LibrarySync, self).__init__()
|
||||
super(Sync, self).__init__()
|
||||
|
||||
def isCanceled(self):
|
||||
return xbmc.abortRequested or state.STOP_PKC
|
||||
|
@ -540,11 +540,11 @@ class LibrarySync(backgroundthread.KillableThread):
|
|||
except:
|
||||
state.DB_SCAN = False
|
||||
utils.window('plex_dbScan', clear=True)
|
||||
utils.ERROR(txt='librarysync.py crashed', notify=True)
|
||||
utils.ERROR(txt='Sync.py crashed', notify=True)
|
||||
raise
|
||||
|
||||
def _run_internal(self):
|
||||
LOG.info("---===### Starting LibrarySync ###===---")
|
||||
LOG.info("---===### Starting Sync ###===---")
|
||||
install_sync_done = utils.settings('SyncInstallRunDone') == 'true'
|
||||
|
||||
playlist_monitor = None
|
||||
|
@ -584,7 +584,7 @@ class LibrarySync(backgroundthread.KillableThread):
|
|||
while self.isSuspended():
|
||||
if self.isCanceled():
|
||||
# Abort was requested while waiting. We should exit
|
||||
LOG.info("###===--- LibrarySync Stopped ---===###")
|
||||
LOG.info("###===--- Sync Stopped ---===###")
|
||||
return
|
||||
xbmc.sleep(1000)
|
||||
|
||||
|
@ -722,4 +722,4 @@ class LibrarySync(backgroundthread.KillableThread):
|
|||
DU().stopSession()
|
||||
except AttributeError:
|
||||
pass
|
||||
LOG.info("###===--- LibrarySync Stopped ---===###")
|
||||
LOG.info("###===--- Sync Stopped ---===###")
|
Loading…
Reference in a new issue