• 1
  • 186
  • 187
  • 188(current)
  • 189
  • 190
  • 197
[RELEASE] Texture Cache Maintenance utility
Some of my movies have fanart and posters that were on a shared device.  That device was removed long ago, but the posters and fanart appear to be still defined somewhere.  texturecache just throws up errors.  I'm guessing it can't remove the items because they are long gone.  What options, or combination of options can I use to force the removal of these items?

Thanks

Daryl
Reply
(2020-05-04, 17:40)rosede Wrote: Some of my movies have fanart and posters that were on a shared device.  That device was removed long ago, but the posters and fanart appear to be still defined somewhere.  texturecache just throws up errors.  I'm guessing it can't remove the items because they are long gone.  What options, or combination of options can I use to force the removal of these items?

Thanks

Daryl

I couldn't get texturecache.py to clean out the old missing fanart and posters, so I logged into the database and removed them manually.  I re-ran texturecache.py  attempting to re-cache the thumbnails and artwork.  At first all looked good.  Some of the missing items were recached, but others, were not.  There are several missing items that need to be recached, but texturedcache.py just skips them.
Quote:Cache pre-load activity summary for "movies":

              |    fanart   |    poster   |  set.fanart |  set.poster |    thumb    |    TOTAL
--------------+-------------+-------------+-------------+-------------+-------------+-------------
Cached        |      -      |      -      |      -      |      -      |      -      |      0
Deleted       |      -      |      -      |      -      |      -      |      -      |      0
Duplicate     |      2      |      2      |      49     |      50     |      -      |     103
Error         |      57     |      61     |      20     |      20     |      -      |     158
Ignored       |      -      |      -      |      -      |      -      |      4      |      4
Skipped       |     262     |     284     |      40     |      42     |      -      |     628
Undefined     |      -      |      -      |      -      |      -      |      -      |      0
==================================================================================================
TOTAL         |     321     |     347     |     109     |     112     |      4      |     893
Download Time | 00:00:09.12 | 00:00:40.00 | 00:00:58.82 | 00:01:25.42 |      -      | 00:03:10.56

  Threads Used: 2
   Min/Avg/Max: 03.00 / 00.83 / 07.55 downloads per second
   Min/Avg/Max: 00.19 / 02.41 / 20.04 seconds per download

       Loading: 00:00:01.38
       Parsing: 00:00:00.24
     Comparing: 00:00:02.43
   Downloading: 00:03:10.59
 TOTAL RUNTIME: 00:03:14.89
 

I've enabled logging, but I don't see any errors.  Why can't texturecache.py recache these missing items?

Thanks

Daryl
Reply
(2020-05-03, 22:17)WolfIsMyName Wrote: Hey folks,

Searching this thread in desperation, I've tried a couple of approaches to run this script on Kodi 18.6 "Leia" running on Android Fire TV Stick 4K.

First try with Autoexec.py, second try using the Json-rpc api, third try kodi.callbacks always with the same result:
https://paste.kodi.tv/ikocipalaj.kodi

I've read that this problem is OS related and tried the proposed approach here with shell.py file, which lead to this error:
https://paste.kodi.tv/milesezipu.kodi

I have no idea how to make this script work on Android, If anyone has managed to do so please share.

Thanks

I've pushed v2.5.4 which should at least help with the first "isatty" issue.
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
(2020-05-05, 18:52)rosede Wrote: I couldn't get texturecache.py to clean out the old missing fanart and posters, so I logged into the database and removed them manually.  I re-ran texturecache.py  attempting to re-cache the thumbnails and artwork.  At first all looked good.  Some of the missing items were recached, but others, were not.  There are several missing items that need to be recached, but texturedcache.py just skips them.

The mklocal.py script will fix these - there's a link at the bottom of the first post.

Basically you pipe the output of jd movies through mklocal.py and let it generate commands that will update your artwork - if the artwork doesn't exist or isn't accessible (and you specify the mklocal.py options --read-only --nokeep) then the command to remove the artwork will be generated. Then, finally, run the commands through texturecache.py to apply them to your library.

(2020-05-05, 18:52)rosede Wrote:
text:
Cache pre-load activity summary for "movies":

              |    fanart   |    poster   |  set.fanart |  set.poster |    thumb    |    TOTAL
--------------+-------------+-------------+-------------+-------------+-------------+-------------
Cached        |      -      |      -      |      -      |      -      |      -      |      0
Deleted       |      -      |      -      |      -      |      -      |      -      |      0
Duplicate     |      2      |      2      |      49     |      50     |      -      |     103
Error         |      57     |      61     |      20     |      20     |      -      |     158
Ignored       |      -      |      -      |      -      |      -      |      4      |      4
Skipped       |     262     |     284     |      40     |      42     |      -      |     628
Undefined     |      -      |      -      |      -      |      -      |      -      |      0
==================================================================================================
TOTAL         |     321     |     347     |     109     |     112     |      4      |     893
Download Time | 00:00:09.12 | 00:00:40.00 | 00:00:58.82 | 00:01:25.42 |      -      | 00:03:10.56

  Threads Used: 2
   Min/Avg/Max: 03.00 / 00.83 / 07.55 downloads per second
   Min/Avg/Max: 00.19 / 02.41 / 20.04 seconds per download

       Loading: 00:00:01.38
       Parsing: 00:00:00.24
     Comparing: 00:00:02.43
   Downloading: 00:03:10.59
 TOTAL RUNTIME: 00:03:14.89
 
I've enabled logging, but I don't see any errors.  Why can't texturecache.py recache these missing items?

Thanks

Daryl

The only line to worry about is the ERROR line - it says there were 158 errors, which would correspond to artwork items that cannot be downloaded by Kodi, so check your kodi log for errors.
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
(2020-05-11, 19:32)Milhouse Wrote:
(2020-05-03, 22:17)WolfIsMyName Wrote: Hey folks,

Searching this thread in desperation, I've tried a couple of approaches to run this script on Kodi 18.6 "Leia" running on Android Fire TV Stick 4K.

First try with Autoexec.py, second try using the Json-rpc api, third try kodi.callbacks always with the same result:
https://paste.kodi.tv/ikocipalaj.kodi

I've read that this problem is OS related and tried the proposed approach here with shell.py file, which lead to this error:
https://paste.kodi.tv/milesezipu.kodi

I have no idea how to make this script work on Android, If anyone has managed to do so please share.

Thanks

I've pushed v2.5.4 which should at least help with the first "isatty" issue. 
Thank you so much, it's the biggest breakthrough I've had in weeks. Sadly I'm now faced with another issue Sadhttps://paste.kodi.tv/zocifiwuve.kodi
Reply
(2020-05-11, 20:35)WolfIsMyName Wrote: Thank you so much, it's the biggest breakthrough I've had in weeks. Sadly I'm now faced with another issue Sadhttps://paste.kodi.tv/zocifiwuve.kodi

I don't know what command you are running, but I would suggest redirecting stderr to /dev/null as you don't need that to appear in the kodi log, and you might also want to redirect stdout to a separate file, for example:
text:

texturecache.py YOURARGSHERE @logfile=/tmp/tc.log 2>/dev/null >/tmp/stdout.log
where you replace YOURARGSHERE with c movies (or whatever).

Remove >/tmp/stdout.log if you want the script output to appear in kodi.log.

Upload the log file /tmp/tc.log (along with kodi.log and/or /tmp/stdout.log) if you still have problems and I'll see what I can do (but I don't test on Android and am not very familiar with that environment from a Python point of view - it's usually fairly locked down).
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
(2020-05-12, 00:49)Milhouse Wrote:
(2020-05-11, 20:35)WolfIsMyName Wrote: Thank you so much, it's the biggest breakthrough I've had in weeks. Sadly I'm now faced with another issue Sadhttps://paste.kodi.tv/zocifiwuve.kodi

I don't know what command you are running, but I would suggest redirecting stderr to /dev/null as you don't need that to appear in the kodi log, and you might also want to redirect stdout to a separate file, for example:
text:

texturecache.py YOURARGSHERE @logfile=/tmp/tc.log 2>/dev/null >/tmp/stdout.log
where you replace YOURARGSHERE with c movies (or whatever).

Remove >/tmp/stdout.log if you want the script output to appear in kodi.log.

Upload the log file /tmp/tc.log (along with kodi.log and/or /tmp/stdout.log) if you still have problems and I'll see what I can do (but I don't test on Android and am not very familiar with that environment from a Python point of view - it's usually fairly locked down). 
Yeah I see what you mean, struggling with it for weeks now. I was able to generate the tc.log file: https://paste.kodi.tv/moderosuke.kodi , kodi.log remains the same: https://paste.kodi.tv/ruxawejeco.kodi. I hope that helps, thank you once again.
Reply
(2020-05-12, 23:55)WolfIsMyName Wrote: Yeah I see what you mean, struggling with it for weeks now. I was able to generate the tc.log file: https://paste.kodi.tv/moderosuke.kodi , kodi.log remains the same: https://paste.kodi.tv/ruxawejeco.kodi. I hope that helps, thank you once again.

The script appears to have executed (and exited) successfully, and there's nothing in your cache to prune at this time.

From the texturecache log:
text:

2020-05-13 00:41:13.247724:MainThread: libTextures.PARSING JSON DATA: {"id":"libTextures","jsonrpc":"2.0","result":{"textures":[]}}
2020-05-13 00:41:13.248148:MainThread: libTextures.PARSING COMPLETE, elapsed time: 0.000529 seconds
2020-05-13 00:41:13.248466:MainThread: libTextures.FINISHED, elapsed time: 0.011762 seconds
2020-05-13 00:41:13.251217:MainThread: Successful completion
so I'm not really sure why Kodi believes the script has "aborted" - perhaps that's just something kodi logs whenever an executed script exits and is nothing to worry about?

Other than the noise from stdout/stderr, it all looks fine...
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
(2020-05-13, 19:54)Milhouse Wrote:
(2020-05-12, 23:55)WolfIsMyName Wrote: Yeah I see what you mean, struggling with it for weeks now. I was able to generate the tc.log file: https://paste.kodi.tv/moderosuke.kodi , kodi.log remains the same: https://paste.kodi.tv/ruxawejeco.kodi. I hope that helps, thank you once again.

The script appears to have executed (and exited) successfully, and there's nothing in your cache to prune at this time.

From the texturecache log:
text:

2020-05-13 00:41:13.247724:MainThread: libTextures.PARSING JSON DATA: {"id":"libTextures","jsonrpc":"2.0","result":{"textures":[]}}
2020-05-13 00:41:13.248148:MainThread: libTextures.PARSING COMPLETE, elapsed time: 0.000529 seconds
2020-05-13 00:41:13.248466:MainThread: libTextures.FINISHED, elapsed time: 0.011762 seconds
2020-05-13 00:41:13.251217:MainThread: Successful completion
so I'm not really sure why Kodi believes the script has "aborted" - perhaps that's just something kodi logs whenever an executed script exits and is nothing to worry about?

Other than the noise from stdout/stderr, it all looks fine... 
Yes, I can now confirm the script works as expected, except for the strange messages. Thank you for the support.
I should note that in order to make it work I had to replace this peace of code on row 8657: https://paste.kodi.tv/lesaxaquqo with this one: https://paste.kodi.tv/ugakolewir
Reply
Hey,

I have recently changed my database from local to mysql.

Images are now taking a long time to load.

Everything is cached using 'c', but the images are still loading from file rather than the texturecache db.

Am I missing something when using mysql? The queries come back super quick after some optimisation, however it looks like the full image is being loaded from the thumbnail folder.

What can I do to figure out why its not coming from the texturecache?

Cheers
Reply
(2020-05-18, 12:02)yhs4260 Wrote: Hey,

I have recently changed my database from local to mysql.

Images are now taking a long time to load.

Everything is cached using 'c', but the images are still loading from file rather than the texturecache db.

Am I missing something when using mysql? The queries come back super quick after some optimisation, however it looks like the full image is being loaded from the thumbnail folder.

What can I do to figure out why its not coming from the texturecache?

Cheers

The Texture Cache system has nothing to do with MySQL, so switching to a MySQL shared database should not result in any change to texture cache behaviour.

I'm not entirely sure what the problem is - are you expecting the cached images to be stored in (and retrieved from) the Textures13.db SQLite database - because that's not how it works. The database is only used to store references to the cached artwork files that are stored in (and retrieved from) the Thumbnails folder, so if you see the cached artwork being retrieved from the Thumbnails folder (and not from the original artwork source location) then the texture cache is working as expected.
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
Is it possible to NOT process a certain source? I have 8Gb storage in my mediaplayer and 1Tb of photo's I use as a slideshow screensaver. To prevent them from being cached, they're mounted in my skin folder (which isn't cached).

texturecache.py sources shows it like this: pictures: Fotos: special://skin/_fotos/Public.

When I purge my texturecache, it still processes my pictures even though I have prune.retain.pictures = yes in my texturecache.cfg. Loading Pictures takes about 15-20 minutes to finish, but there's never anything to clear so I was wondering if I could bypass it all together. Would be a nice feature too ./texturecache -P <source>, but that's because I have pseudo OCD. Whenever I delete a movie for instance, I run texturecache.py Smile
CoreElec on a tn95 (s905x). Onkyo NR-656. Canton Movie CD-1000. LG 55B6V.

If it ain't broke: break it, fix it, repeat
Reply
running Rp2 #0527 and texturecache v2.5.4

A recent libreelec update required me to set a web server user/password, and I get the following error:
Code:
# texturecache.py c
Traceback (most recent call last):
  File "/usr/bin/texturecache.py", line 8663, in <module>
    main(sys.argv[1:])
  File "/usr/bin/texturecache.py", line 8353, in main
    if not checkConfig(argv[0]): sys.exit(2)
  File "/usr/bin/texturecache.py", line 7893, in checkConfig
    data = wcomms.sendJSON(REQUEST, "libPing", checkResult=False, useWebServer=True)
  File "/usr/bin/texturecache.py", line 2230, in sendJSON
    return self.sendWeb("POST", "/jsonrpc", id, request, {"Content-Type": "application/json"}, timeout=timeout)
  File "/usr/bin/texturecache.py", line 2177, in sendWeb
    raise httplib.HTTPException("Remote web host requires webserver.username/webserver.password properties")
http.client.HTTPException: Remote web host requires webserver.username/webserver.password properties

I see that I need to edit texturecache.cfg, I tried both #locate and #find, and they don't seem to work.
I checked /.kodi/userdata and it isn't there either. Where can I find texturecache.cfg ?

Edit* Got it, just created the file myself in /storage/.config
Reply
RP3 on build #0527, though this happened during the last build, and continues even reverting back to #0404 and moving forward. Any idea how I can get it to scan/recache the missing images? 
The database is stored in MySql on a remote Win10 PC. Both the RP3 and MySql systems have been rebooted. Music and TV Shows are fine, just Movies are not showing.

Image

I have tried the following:
# texturecache.py c movies
# texturecache.py C movies
# texturecache.py c
The original post example shows ./texturecache.py c movies (with ./) but using that errors with ./texturecache.py not found.

None have helped, and I get mostly errors as seen below:

Image

Image

How can I correct my images problem?
Reply
I tried searching and couldn't find an answer.  This is a huge thread so maybe the needle is in the haystack somewhere and I just couldn't find it.  Apologies if that's the case.

I want to regularly clean out stale thumbnails.  From what I understand I want the P option for that, and the p option is a "dry-run" version of that.  Am I correct so far?

I also have half-a-dozen profiles.  Do I simply run

bash:
python texturecache.py P @profile.name=profile_name

for each profile or is there a more efficient way to run it for all profiles at once?  The latter would be nice as it means not having to keep updating the script calling texturecache.py if I make profile changes.
Reply
  • 1
  • 186
  • 187
  • 188(current)
  • 189
  • 190
  • 197

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