• 1
  • 170
  • 171
  • 172(current)
  • 173
  • 174
  • 197
[RELEASE] Texture Cache Maintenance utility
(2019-01-12, 14:35)xodi Wrote: For version 2.4.8, I used the "c" option to cache all textures, from the output of the command, I saw a lot of images cached and there is no problem reported at the end, but I found the discart and actor image are still being loaded from online by Kodi (it took some time before these image showing). Is this expected?

DEBUG: Caching image 'https://assets.fanart.tv/fanart/movies/269149/moviedisc/zootopia-56bfc33e7cd6f.png' to '6/6e7066a1.png':
DEBUG: cached image 'special://masterprofile/Thumbnails/6/6e7066a1.png' size 720x720

DEBUG: Caching image 'http://image.tmdb.org/t/p/original/mEArEtz9hiSptnllYJvhh0mbp35.jpg' to 'd/de43a668.jpg':
DEBUG: cached image 'special://masterprofile/Thumbnails/d/de43a668.jpg' size 300x450

If you have not configured texturecache.py to cache cast (actor) thumbnails - the default is not to cache cast thumbs - then any cached cast thumbnails will be pruned when you run P.

Enable cast thumbnail caching by configuring cache.castthumb = yes in texturecache.cfg (or on the command line), and then your cast thumbs will be cached, and they will also no longer be pruned.

Not sure about your discart - if the discart urls are in your media library, and the image files are accessible to kodi, then they should have been cached when you run texturecache.py.

It is possible to cache only certain types of artwork, eg. cache.artwork=poster,fanart would cache only posters and fanart. However the default is to cache all movie artwork (poster, fanart, discart, clearlogo, whatever) - have you perhaps configured texturecache.py to cache only a limited set of artwork types, that does not include discart?

Otherwise, enable logging and re-cache only a specific movie that includes both actors and discart - for example run texturecache.py @logfile=tc.log C movies <movie-name-with-actors-and-discart> - then upload tc.log somewhere and post the link here.

(2019-01-12, 14:35)xodi Wrote: I run the "P" command to clear the texture and run "c" command again to cache and then run the "p" to see what's non-referenced image in texture cache, just found a lot of discart and actor images in the list, for example:

031496|b/b2ad02e2.png|0720|0720|0001||                   |https://assets.fanart.tv/fanart/movies/315635/moviedisc/spider-man-homecoming-590086b14964f.png

Seems the texturecache tool cached these images successfully, but failed to set them in database, so Kodi has no knowledge about them and download it again from online when they are used.

Is that spider man image in your media library? It would appear not, otherwise the script would not be suggesting it should be pruned when you run p.

Can you run texturecache.py jd movies homecoming (I'm assuming the Spider Man movie for the above discart PNG includes "homecoming" in the title - if not replace "homecoming" with whatever name you have used for the movie) and paste the output here.
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
@Milhouse I get a lot of error when running the script.

Code:
12:42:07.879 T:140271674193664 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for https://assets.fanart.tv/fanart/movies/3...59959d.png
12:42:08.120 T:140271674193664 ERROR: CCurlFile::Exists - Failed: HTTP returned error 503 for https://assets.fanart.tv/fanart/movies/3...58d081.png
12:42:08.456 T:140272180635392 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for https://assets.fanart.tv/fanart/movies/3...58d081.png
12:42:08.996 T:140271674193664 ERROR: Previous line repeats 1 times.
12:42:08.997 T:140271674193664 ERROR: CCurlFile::Exists - Failed: HTTP returned error 503 for https://assets.fanart.tv/fanart/movies/3...754044.png
12:42:09.535 T:140271674193664 ERROR: Previous line repeats 1 times.
12:42:09.535 T:140271674193664 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for https://assets.fanart.tv/fanart/movies/3...754044.png
12:42:09.708 T:140271674193664 ERROR: CCurlFile::Exists - Failed: HTTP returned error 503 for https://assets.fanart.tv/fanart/movies/2...77e865.png
12:42:10.208 T:140271674193664 ERROR: Previous line repeats 1 times.
12:42:10.208 T:140271674193664 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for https://assets.fanart.tv/fanart/movies/2...77e865.png
12:42:10.399 T:140271674193664 ERROR: CCurlFile::Exists - Failed: HTTP returned error 503 for https://assets.fanart.tv/fanart/movies/2...13591b.png
12:42:10.890 T:140271674193664 ERROR: Previous line repeats 1 times.
12:42:10.890 T:140271674193664 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for https://assets.fanart.tv/fanart/movies/2...13591b.png
12:42:11.104 T:140271674193664 ERROR: CCurlFile::Exists - Failed: HTTP returned error 503 for https://assets.fanart.tv/fanart/movies/9...41add1.png
12:42:11.436 T:140272180635392 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for https://assets.fanart.tv/fanart/movies/9...41add1.png
12:42:12.008 T:140272037959424 ERROR: Previous line repeats 1 times.
12:42:12.008 T:140272037959424 ERROR: CCurlFile::Exists - Failed: HTTP returned error 503 for https://assets.fanart.tv/fanart/movies/3...f0b8f3.png
12:42:12.554 T:140272037959424 ERROR: Previous line repeats 1 times.
12:42:12.554 T:140272037959424 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for https://assets.fanart.tv/fanart/movies/3...f0b8f3.png
12:42:12.770 T:140272037959424 ERROR: CCurlFile::Exists - Failed: HTTP returned error 503 for https://assets.fanart.tv/fanart/movies/9...55c525.png
12:42:13.135 T:140272180635392 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for https://assets.fanart.tv/fanart/movies/9...55c525.png
12:42:13.728 T:140272037959424 ERROR: Previous line repeats 1 times.
12:42:13.728 T:140272037959424 ERROR: CCurlFile::Exists - Failed: HTTP returned error 503 for https://assets.fanart.tv/fanart/movies/3...e367ef.png
12:42:14.107 T:140272180635392 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for https://assets.fanart.tv/fanart/movies/3...e367ef.png

It looks like fanart.tv is down?
Reply
Yes, probably (or it is rate-limiting).
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
I want to run texturecache.py qax tvshows but only on shows that have as source smb://HYPERV/Data/TVSeries
Is that possible?
Reply
(2019-01-29, 18:32)Rouzax Wrote: I want to run texturecache.py qax tvshows but only on shows that have as source smb://HYPERV/Data/TVSeries
Is that possible?

No, sorry - not possible.
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
Hi, Greetings to all forum users

I imported my movies library but I lost all actors pictures, so I discoverd this wonderful script

I set in texturecache.cfg
cache.castthumb = yes
cache.
extrafanart = yes
cache.
extrathumbs = yes


Than I run texturecache.py c movies
but I have always this message "Parsing Movies: ..."
I waited 1 hour but that message seems endless
I don't have a huge movies library: they are 170

What am I doing wrong?
Reply
(2019-02-13, 21:21)Yuren Wrote: Hi, Greetings to all forum users

I imported my movies library but I lost all actors pictures, so I discoverd this wonderful script

I set in texturecache.cfg
cache.castthumb = yes
cache.
extrafanart = yes
cache.
extrathumbs = yes


Than I run texturecache.py c movies
but I have always this message "Parsing Movies: ..."
I waited 1 hour but that message seems endless
I don't have a huge movies library: they are 170

What am I doing wrong?

Enable logging by adding "@log=tc.log" on the texturecache.py command line and upload the tc.log file somewhere, then post a link (zip compress the file if it's large, use dropbox/googledrive etc.). Enabling the cache.extrathumbs/cache.extrafanart options will require the script to probe the filesystem storing your movies via Kodi so if the filesystem with your movies is not accessible to kodi (disk offline? file location not valid?) it may result in a massive number of timeouts so check your kodi.log for errors too.
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
Unfortunately I don't know how generate the log
I ran texturecache.py @log=tc.log c movies
but I have in my prompt this message "Parsing Movies: ..." and nothing else. If I close the prompt the log isn't generated anyway

I will try to run the script during this night
Reply
Sorry, it's @logfile=tc.log, add that to your command line then wait a few minutes at the "Parsing movies..." message before pressing CTRL-C and then upload the log file.

Also as I said, check for errors in kodi.log as it's likely that Kodi can't access your file systems and you need to fix that. It would be a good idea to enable debug log (wiki) in Kodi before running the texturecache.py @logfile=tc.log c movies command and upload both the tc.log and kodi.log files somewhere.
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
log files


It seems to me that I don't have problem with file systems.
However I ran your script with administrator privileges

This night I ran the script for 6 hours with the same result
Reply
hey man,
I have a bunch of missing thumbnails. Ive been trying to fix it with "texturecache.py c" but it just gives me an error on every download.
I dont know where to find the tc.log but I did find the kodi log and all it says is
00:44:16.868 T:7276   DEBUG: CUtil::GetMatchingSource: no matching source found for [E:\-=Movies=-\.....
and so for every entry.
any ideas?
Thanks!

PS
why dosnt this program have like a simple 2-3 button GUI. I spent tens of hours just to get so far and I still cant do the simple job of cleaning out clutter and re-downloading missing posters... Sad
Reply
(2019-02-15, 00:56)bob77 Wrote: hey man,
I have a bunch of missing thumbnails. Ive been trying to fix it with "texturecache.py c" but it just gives me an error on every download.
I dont know where to find the tc.log but I did find the kodi log and all it says is
00:44:16.868 T:7276   DEBUG: CUtil::GetMatchingSource: no matching source found for [E:\-=Movies=-\.....
and so for every entry.
any ideas?
Thanks!

See messages above yours about where to put the tc.log.

As for your errors, can't really help much without a log but I assume you don't have the paths for your movies in your sources.xml so Kodi can't/won't read the directory contents for security reasons. Or the path is no longer accessible to Kodi because you've deleted/moved/renamed/offlined the storage.
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
(2019-02-14, 12:35)Yuren Wrote: log files


It seems to me that I don't have problem with file systems.
However I ran your script with administrator privileges

This night I ran the script for 6 hours with the same result

I don't think your tc.log file is complete as I don't see anything logged for the final request which is the cause of the problem.

For some reason Kodi is not able to parse one of your directory paths - based on the kodi.log, Kodi is choking on on the following Files.GetDirectory request:
text:

2019-02-14 11:16:38.141 T:11528 ERROR: JSONRPC: Failed to parse '{"method": "Files.GetDirectory", "params": {"directory": "W:\\torrent\\[TV Rip ITA}Alla Ricerca Della Valle Incantata 2 - Le Avventure Della Grande Vallata\\", "media": "files", "properties": ["file", "lastmodified"]}'

In the tc.log you submitted I don't see this request being logged (and the request is logged before it is sent to kodi), or any response. If Kodi did not return any response then that might explain why the script is hung, as it is waiting for a response it will never receive.

In my own testing I see this:
text:

neil@nm-linux:~/projects/texturecache.py$ ./texturecache.py directory "W:\\torrent\\[TV Rip ITA}Alla Ricerca Della Valle Incantata 2 - Le Avventure Della Grande Vallata\\"
^C
neil@nm-linux:~/projects/texturecache.py$ tail -10 /tmp/tc.log
"extrajson.tvshows.tvshow": "plot, rating, cast, file, imdbnumber",
"extrajson.vgenres": null
}
}
2019-02-14 23:17:04.353676:MainThread: libDirectory.JSON SOCKET REQUEST: [{"jsonrpc": "2.0", "params": {"directory": "W:\\torrent\\[TV Rip ITA}Alla Ricerca Della Valle Incantata 2 - Le Avventure Della Grande Vallata\\", "media": "files", "properties": ["file", "lastmodified"]}, "method": "Files.GetDirectory", "id": "libDirectory"}]
2019-02-14 23:17:04.355099:MainThread: RPC connection established with IPv4
2019-02-14 23:17:04.356254:MainThread: libDirectory.BUFFER RECEIVED (len 76)
2019-02-14 23:17:04.356328:MainThread: libDirectory.PARSING JSON DATA: {"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
2019-02-14 23:17:04.356375:MainThread: libDirectory.PARSING COMPLETE, elapsed time: 0.000056 seconds
2019-02-14 23:17:04.356412:MainThread: libDirectory.READING SOCKET FOR A RESPONSE...

The important part of the response is "id":null which means that the texturecache.py script is not able to match the response with the request, so the script continues waiting for the response with "id": "libDirectory" (which never comes).

It does appear that the JSON-RPC interface cannot parse requests with properties that include }, for example the following will cause a Kodi parse failure exactly as you have found:
text:

neil@nm-linux:~/projects/texturecache.py$ ./texturecache.py directory "/storage/json/ab}c"
^C
neil@nm-linux:~/projects/texturecache.py$ tail -10 /tmp/tc.log
"extrajson.tvshows.tvshow": "plot, rating, cast, file, imdbnumber",
"extrajson.vgenres": null
}
}
2019-02-14 23:31:48.705037:MainThread: libDirectory.JSON SOCKET REQUEST: [{"jsonrpc": "2.0", "params": {"directory": "/storage/json/ab}c", "media": "files", "properties": ["file", "lastmodified"]}, "method": "Files.GetDirectory", "id": "libDirectory"}]
2019-02-14 23:31:48.706518:MainThread: RPC connection established with IPv4
2019-02-14 23:31:48.707869:MainThread: libDirectory.BUFFER RECEIVED (len 76)
2019-02-14 23:31:48.707951:MainThread: libDirectory.PARSING JSON DATA: {"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
2019-02-14 23:31:48.707999:MainThread: libDirectory.PARSING COMPLETE, elapsed time: 0.000068 seconds
2019-02-14 23:31:48.708039:MainThread: libDirectory.READING SOCKET FOR A RESPONSE...

Yet the same request to the Kodi web server succeeds:
text:

$ curl -s --data-binary '{"jsonrpc": "2.0", "params": {"directory": "/storage/json/ab}c", "media": "files", "properties": ["file", "lastmodified"]}"method": "Files.GetDirectory", "id": "libDirectory"}' -H 'content-type: application/json;' http://192.168.0.18:8080/jsonrpc; echo
{"id":"libDirectory","jsonrpc":"2.0","result":{"files":[{"file":"/storage/json/ab}c/testfile2.txt","filetype":"file","label":"testfile2.txt","lastmodified":"2019-02-14 22:44:13","type":"unknown"}],"limits":{"end":1,"start":0,"total":1}}}

So this looks like a Kodi/JSON-RPC bug.

I would suggest you open an issue on the Kodi github as Kodi should be parsing this request, but fails because it contains } which doesn't require escaping in JSON, so this looks like a parsing bug in Kodi.

Edit: This doesn't appear to be a Kodi 18 bug, as it is also present in Kodi 17.6 (LibreELEC 8.2.5).
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
(2019-02-15, 01:38)Milhouse Wrote:
(2019-02-15, 00:56)bob77 Wrote: hey man,
I have a bunch of missing thumbnails. Ive been trying to fix it with "texturecache.py c" but it just gives me an error on every download.
I dont know where to find the tc.log but I did find the kodi log and all it says is
00:44:16.868 T:7276   DEBUG: CUtil::GetMatchingSource: no matching source found for [E:\-=Movies=-\.....
and so for every entry.
any ideas?
Thanks!

See messages above yours about where to put the tc.log.

As for your errors, can't really help much without a log but I assume you don't have the paths for your movies in your sources.xml so Kodi can't/won't read the directory contents for security reasons. Or the path is no longer accessible to Kodi because you've deleted/moved/renamed/offlined the storage.
[/quote]
Hey man,
thanks for replying.
I do have the paths in sources.xml and the paths are accessible. I can play all the movies with missing posters through Kodi. So Kodi can and does find them and I can update the poster through Kodi one by one. but the script gives me errors and does not want to update the posters automatically.

I did read the above posts and I ran
texturecache.py @log=tc.log c movies
I just dont understand where this tc.log file is saved. I searched all my HDD and it didnt find such a file. where is it supposed to be saved?
Reply
Thanks for your support

I created a new Kodi user profile directory and I imported again my library, then I removed from the library   W:\\torrent\\[TV Rip ITA}Alla Ricerca Della Valle Incantata 2 - Le Avventure Della Grande Vallata
However I have again many problems
When I run  texturecache.py c movies no actor thumb is downloaded

After many attemps and investigations I understand that Kodi, maybe, isn't able to locate the files (even if I can play them)

I ran this command texturecache.py qa and these are some lines of the report
Movie    [Tropic Thunder                                    ]: WARN (missing cast, local not found; missing file)
Episode  [X-Files, Stagione 11 Episode 11x10                ]: WARN (missing file)
TVShow   [X-Files                                           ]: WARN (missing cast, local not found)



I don't know how to fix my library



ps:   Before you responded to me I have created a new Kodi user profile directory and I have imported the library. After that, I have run  texturecache.py c movies  and this time your script downloaded all actor thumbs and then again freeze on  W:\\torrent\\[TV Rip ITA}Alla Ricerca Della Valle Incantata 2 - Le Avventure Della Grande Vallata
Reply
  • 1
  • 170
  • 171
  • 172(current)
  • 173
  • 174
  • 197

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Texture Cache Maintenance utility17