Merge pull request #101 from mcarlton00/image-cache-fix

Fix image caching
This commit is contained in:
mcarlton00
2021-12-05 22:30:28 -05:00
committed by GitHub
2 changed files with 2 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ from .loghandler import LazyLogger
from .jsonrpc import JsonRpc, get_value
from .translation import string_load
from .datamanager import DataManager
from .utils import get_art, double_urlencode
from .utils import get_art
from .kodi_utils import HomeWindow
downloadUtils = DownloadUtils()
@@ -326,8 +326,7 @@ class CacheArtwork(threading.Thread):
count_done = 0
for index, get_url in enumerate(missing_texture_urls, 1):
url = double_urlencode(get_url)
kodi_texture_url = ("/image/image://%s" % url)
kodi_texture_url = "/image/image://{0}".format(get_url)
log.debug("kodi_texture_url: {0}".format(kodi_texture_url))
percentage = int((float(index) / float(total)) * 100)

View File

@@ -284,12 +284,6 @@ def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
def double_urlencode(text):
text = single_urlencode(text)
text = single_urlencode(text)
return text
def single_urlencode(text):
# urlencode needs a utf- string
text = urlencode({'blahblahblah': text.encode('utf-8')})