diff --git a/resources/lib/service_entry.py b/resources/lib/service_entry.py index 7738b0db..c852f69e 100644 --- a/resources/lib/service_entry.py +++ b/resources/lib/service_entry.py @@ -16,7 +16,6 @@ from . import plex_functions as PF from . import command_pipeline from . import playback_starter from . import playqueue -from . import artwork from . import variables as v from . import state from . import loghandler @@ -44,7 +43,6 @@ class Service(): plexcompanion_running = False kodimonitor_running = False playback_starter_running = False - image_cache_thread_running = False def __init__(self): # Initial logging @@ -98,8 +96,6 @@ class Service(): self.specialmonitor = kodimonitor.SpecialMonitor() self.playback_starter = playback_starter.PlaybackStarter() self.playqueue = playqueue.PlayqueueMonitor() - if utils.settings('enableTextureCache') == "true": - self.image_cache_thread = artwork.Image_Cache_Thread() welcome_msg = True counter = 0 @@ -158,10 +154,6 @@ class Service(): self.playback_starter_running = True self.playback_starter.start() self.playqueue.start() - if (not self.image_cache_thread_running and - utils.settings('enableTextureCache') == "true"): - self.image_cache_thread_running = True - self.image_cache_thread.start() else: if (self.user.user is None) and self.warn_auth: # Alert user is not authenticated and suppress future diff --git a/resources/lib/sync.py b/resources/lib/sync.py index a784464f..d13bf3d2 100644 --- a/resources/lib/sync.py +++ b/resources/lib/sync.py @@ -35,6 +35,8 @@ class Sync(backgroundthread.KillableThread): self.fanart = None # Show sync dialog even if user deactivated? self.force_dialog = False + if utils.settings('enableTextureCache') == "true": + self.image_cache_thread = artwork.Image_Cache_Thread() # Lock used to wait on a full sync, e.g. on initial sync # self.lock = backgroundthread.threading.Lock() super(Sync, self).__init__() @@ -248,6 +250,7 @@ class Sync(backgroundthread.KillableThread): from . import playlists playlist_monitor = playlists.kodi_playlist_monitor() self.start_fanart_download(refresh=False) + self.image_cache_thread.start() else: LOG.error('Initial start-up full sync unsuccessful') self.force_dialog = False @@ -270,6 +273,7 @@ class Sync(backgroundthread.KillableThread): playlist_monitor = playlists.kodi_playlist_monitor() artwork.Artwork().cache_major_artwork() self.start_fanart_download(refresh=False) + self.image_cache_thread.start() else: LOG.info('Startup sync has not yet been successful')