[RELEASE] Texture Cache Maintenance utility
This is where the problem lies in Aeon Nox 4.1.9 (from github):
Code:
./1080i/variables.xml:1814:        <value>$INFO[ListItem.Path,,extrathumbs/thumb1.jpg]</value>
./1080i/variables.xml:1820:        <value>$INFO[ListItem.Path,,extrathumbs/thumb2.jpg]</value>
./1080i/variables.xml:1826:        <value>$INFO[ListItem.Path,,extrathumbs/thumb3.jpg]</value>
./1080i/variables.xml:1832:        <value>$INFO[ListItem.Path,,extrathumbs/thumb4.jpg]</value>

It's joining the path items with forward slashes - my guess is the developer is a Linux user, though if [s]he were to specify the alternative "extrathumbs\\thumb1.jpg" they'd end up creating malformed urls for Linux users and also anyone using network shares, which would be a much wider population of users that are then impacted.

Presumably in a skin there is no way to specify the correct forward/backward slash based on the type of path being joined. Perhaps XBMCs skin support should sanitise urls to avoid this kind of problem.

Looking at the skin code, the reason it may be displaying extrathumbs artwork even when the source is offline is because the skin isn't bothering to check if the extrathumbs directory exists before attempting to display the thumbs artwork - it just barrels ahead and displays the thumb[1-4].jpg artwork irrespective. So once the thumbs have been cached they will continue to appear even when the source is offline. This approach would also mean you will be seeing "file not found" errors in xbmc.log for any movie that doesn't have all 4 thumbs.

extrafanart appears to have been implemented using a different technique to extrathumbs, hence the lack of offline capability (maybe using script.grab.fanart?)

Anyway, long story short the url being formatted for extrathumbs by the skin results in a malformed url for local Windows storage, and whether the skin author can fix it so that it works correctly for all types of storage on all platforms, I don't know.

I could change texturecache.py so that it created malformed urls for extrathumbs but chances are it's then going to be wrong for someone else using a different skin that doesn't generate malformed urls for local Windows storage but which might do so for non-local Windows storage, and expecting users to know that their skin is right or wrong is perhaps asking a bit much.

If you really want to change texturecache.py to create malformed extrathumbs urls, the following patch should work - no real testing, mind:
Code:
diff --git a/texturecache.py b/texturecache.py
index 91f7290..aca4f8d 100755
--- a/texturecache.py
+++ b/texturecache.py
@@ -2081,12 +2081,15 @@ class MyJSONComms(object):
             break

     files = []
+    re_thumb_fix = re.compile("(.*extrathumbs)(\\\\)(thumb.*\.jpg)")
     for dir in dirs:
       data = self.getDirectoryList(dir["file"])
       if "result" in data and "files" in data["result"]:
         for file in data["result"]["files"]:
           if file["filetype"] == "file" and file["file"]:
             if os.path.splitext(file["file"])[1].lower() in [".jpg", ".png", ".tbn"]:
+              thumb_fix = re.match(re_thumb_fix,file["file"])
+              if thumb_fix: file["file"] = "%s/%s" % (thumb_fix.group(1), thumb_fix.group(3))
               files.append({"file": MyUtility.denormalise(file["file"], prefix=True), "type": dir["type"].lower()})

     return files

although changing the skin files at the four points listed at the top of this post might be more appropriate, but neither is a long term fix.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply


Messages In This Thread
RE: [RELEASE] Texture Cache Maintenance utility - by Milhouse - 2014-05-05, 21:48
Crash on Gotham on OS X - by desepticon - 2014-05-29, 17:57
Cleaning - by AleisterHH - 2018-05-28, 22:03
RE: Cleaning - by Milhouse - 2018-05-28, 22:16
qax genre not updated - by Just-Me_A-User - 2018-06-12, 22:06
RE: qax genre not updated - by Milhouse - 2018-06-12, 23:40
Logout Mark Read Team Forum Stats Members Help
[RELEASE] Texture Cache Maintenance utility17