diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index db179cee..292beee7 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -41,6 +41,11 @@ msgctxt "#30005" msgid "Username: " msgstr "" +# PKC settings artwork: Enable image caching during Kodi playback +msgctxt "#30009" +msgid "Enable image caching during Kodi playback (restart Kodi!)" +msgstr "" + # Button text msgctxt "#30012" msgid "OK" diff --git a/resources/lib/artwork.py b/resources/lib/artwork.py index 1c39b806..d4e1e80d 100644 --- a/resources/lib/artwork.py +++ b/resources/lib/artwork.py @@ -22,6 +22,10 @@ LOG = getLogger("PLEX." + __name__) # Disable annoying requests warnings requests.packages.urllib3.disable_warnings() ARTWORK_QUEUE = Queue() +IMAGE_CACHING_SUSPENDS = ['SUSPEND_LIBRARY_THREAD', 'DB_SCAN', 'STOP_SYNC'] +if not settings('imageSyncDuringPlayback') == 'true': + IMAGE_CACHING_SUSPENDS.append('SUSPEND_SYNC') + ############################################################################### @@ -33,9 +37,7 @@ def double_urldecode(text): return unquote(unquote(text)) -@thread_methods(add_suspends=['SUSPEND_LIBRARY_THREAD', - 'DB_SCAN', - 'STOP_SYNC']) +@thread_methods(add_suspends=IMAGE_CACHING_SUSPENDS) class Image_Cache_Thread(Thread): sleep_between = 50 # Potentially issues with limited number of threads @@ -47,6 +49,7 @@ class Image_Cache_Thread(Thread): Thread.__init__(self) def run(self): + LOG.info("---===### Starting Image_Cache_Thread ###===---") stopped = self.stopped suspended = self.suspended queue = self.queue diff --git a/resources/settings.xml b/resources/settings.xml index fea2ad2d..928c125f 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -125,6 +125,7 @@ +