Move start of image caching thread to sync
This commit is contained in:
parent
99d0fe7538
commit
58d34e75f0
2 changed files with 4 additions and 8 deletions
|
@ -16,7 +16,6 @@ from . import plex_functions as PF
|
||||||
from . import command_pipeline
|
from . import command_pipeline
|
||||||
from . import playback_starter
|
from . import playback_starter
|
||||||
from . import playqueue
|
from . import playqueue
|
||||||
from . import artwork
|
|
||||||
from . import variables as v
|
from . import variables as v
|
||||||
from . import state
|
from . import state
|
||||||
from . import loghandler
|
from . import loghandler
|
||||||
|
@ -44,7 +43,6 @@ class Service():
|
||||||
plexcompanion_running = False
|
plexcompanion_running = False
|
||||||
kodimonitor_running = False
|
kodimonitor_running = False
|
||||||
playback_starter_running = False
|
playback_starter_running = False
|
||||||
image_cache_thread_running = False
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Initial logging
|
# Initial logging
|
||||||
|
@ -98,8 +96,6 @@ class Service():
|
||||||
self.specialmonitor = kodimonitor.SpecialMonitor()
|
self.specialmonitor = kodimonitor.SpecialMonitor()
|
||||||
self.playback_starter = playback_starter.PlaybackStarter()
|
self.playback_starter = playback_starter.PlaybackStarter()
|
||||||
self.playqueue = playqueue.PlayqueueMonitor()
|
self.playqueue = playqueue.PlayqueueMonitor()
|
||||||
if utils.settings('enableTextureCache') == "true":
|
|
||||||
self.image_cache_thread = artwork.Image_Cache_Thread()
|
|
||||||
|
|
||||||
welcome_msg = True
|
welcome_msg = True
|
||||||
counter = 0
|
counter = 0
|
||||||
|
@ -158,10 +154,6 @@ class Service():
|
||||||
self.playback_starter_running = True
|
self.playback_starter_running = True
|
||||||
self.playback_starter.start()
|
self.playback_starter.start()
|
||||||
self.playqueue.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:
|
else:
|
||||||
if (self.user.user is None) and self.warn_auth:
|
if (self.user.user is None) and self.warn_auth:
|
||||||
# Alert user is not authenticated and suppress future
|
# Alert user is not authenticated and suppress future
|
||||||
|
|
|
@ -35,6 +35,8 @@ class Sync(backgroundthread.KillableThread):
|
||||||
self.fanart = None
|
self.fanart = None
|
||||||
# Show sync dialog even if user deactivated?
|
# Show sync dialog even if user deactivated?
|
||||||
self.force_dialog = False
|
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
|
# Lock used to wait on a full sync, e.g. on initial sync
|
||||||
# self.lock = backgroundthread.threading.Lock()
|
# self.lock = backgroundthread.threading.Lock()
|
||||||
super(Sync, self).__init__()
|
super(Sync, self).__init__()
|
||||||
|
@ -248,6 +250,7 @@ class Sync(backgroundthread.KillableThread):
|
||||||
from . import playlists
|
from . import playlists
|
||||||
playlist_monitor = playlists.kodi_playlist_monitor()
|
playlist_monitor = playlists.kodi_playlist_monitor()
|
||||||
self.start_fanart_download(refresh=False)
|
self.start_fanart_download(refresh=False)
|
||||||
|
self.image_cache_thread.start()
|
||||||
else:
|
else:
|
||||||
LOG.error('Initial start-up full sync unsuccessful')
|
LOG.error('Initial start-up full sync unsuccessful')
|
||||||
self.force_dialog = False
|
self.force_dialog = False
|
||||||
|
@ -270,6 +273,7 @@ class Sync(backgroundthread.KillableThread):
|
||||||
playlist_monitor = playlists.kodi_playlist_monitor()
|
playlist_monitor = playlists.kodi_playlist_monitor()
|
||||||
artwork.Artwork().cache_major_artwork()
|
artwork.Artwork().cache_major_artwork()
|
||||||
self.start_fanart_download(refresh=False)
|
self.start_fanart_download(refresh=False)
|
||||||
|
self.image_cache_thread.start()
|
||||||
else:
|
else:
|
||||||
LOG.info('Startup sync has not yet been successful')
|
LOG.info('Startup sync has not yet been successful')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue