Add toggle to deactivate image caching during playback
- Partially fixes #451 - you can now disable image caching during playback
This commit is contained in:
parent
5cea57e935
commit
51f47452f2
3 changed files with 12 additions and 3 deletions
|
@ -41,6 +41,11 @@ msgctxt "#30005"
|
||||||
msgid "Username: "
|
msgid "Username: "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
# PKC settings artwork: Enable image caching during Kodi playback
|
||||||
|
msgctxt "#30009"
|
||||||
|
msgid "Enable image caching during Kodi playback (restart Kodi!)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
# Button text
|
# Button text
|
||||||
msgctxt "#30012"
|
msgctxt "#30012"
|
||||||
msgid "OK"
|
msgid "OK"
|
||||||
|
|
|
@ -22,6 +22,10 @@ LOG = getLogger("PLEX." + __name__)
|
||||||
# Disable annoying requests warnings
|
# Disable annoying requests warnings
|
||||||
requests.packages.urllib3.disable_warnings()
|
requests.packages.urllib3.disable_warnings()
|
||||||
ARTWORK_QUEUE = Queue()
|
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))
|
return unquote(unquote(text))
|
||||||
|
|
||||||
|
|
||||||
@thread_methods(add_suspends=['SUSPEND_LIBRARY_THREAD',
|
@thread_methods(add_suspends=IMAGE_CACHING_SUSPENDS)
|
||||||
'DB_SCAN',
|
|
||||||
'STOP_SYNC'])
|
|
||||||
class Image_Cache_Thread(Thread):
|
class Image_Cache_Thread(Thread):
|
||||||
sleep_between = 50
|
sleep_between = 50
|
||||||
# Potentially issues with limited number of threads
|
# Potentially issues with limited number of threads
|
||||||
|
@ -47,6 +49,7 @@ class Image_Cache_Thread(Thread):
|
||||||
Thread.__init__(self)
|
Thread.__init__(self)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
LOG.info("---===### Starting Image_Cache_Thread ###===---")
|
||||||
stopped = self.stopped
|
stopped = self.stopped
|
||||||
suspended = self.suspended
|
suspended = self.suspended
|
||||||
queue = self.queue
|
queue = self.queue
|
||||||
|
|
|
@ -125,6 +125,7 @@
|
||||||
<setting id="enableTextureCache" label="30512" type="bool" default="true" /> <!-- Force Artwork Caching -->
|
<setting id="enableTextureCache" label="30512" type="bool" default="true" /> <!-- Force Artwork Caching -->
|
||||||
<setting id="FanartTV" label="30539" type="bool" default="false" /><!-- Download additional art from FanArtTV -->
|
<setting id="FanartTV" label="30539" type="bool" default="false" /><!-- Download additional art from FanArtTV -->
|
||||||
<setting label="39222" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=fanart)" option="close" visible="eq(-1,true)" subsetting="true" /> <!-- Look for missing fanart on FanartTV now -->
|
<setting label="39222" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=fanart)" option="close" visible="eq(-1,true)" subsetting="true" /> <!-- Look for missing fanart on FanartTV now -->
|
||||||
|
<setting id="imageSyncDuringPlayback" label="30009" type="bool" default="true" /><!-- Enable image caching during Kodi playback (restart Kodi!) -->
|
||||||
<setting label="39020" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=texturecache)" option="close" /> <!-- Cache all images to Kodi texture cache now -->
|
<setting label="39020" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=texturecache)" option="close" /> <!-- Cache all images to Kodi texture cache now -->
|
||||||
</category>
|
</category>
|
||||||
<!--
|
<!--
|
||||||
|
|
Loading…
Reference in a new issue