•
• 1
• 70
• 71
• 72(current)
• 73
• 74
• 186
•
[RELEASE] Texture Cache Maintenance utility
Version 1.7.5

Added several new options to set/get Kodi settings.

For example, to view the current GUI language:
Code:
$./texturecache.py getsetting locale.language locale.language: English if the remote client is configured to use English. To see if debug logging is enabled: Code: $ ./texturecache.py getsetting debug.showloginfo debug.showloginfo: False
(it's not enabled).

To view all the details of all settings:
Code:
./texturecache.py getsettings

and to view only those settings whose id contains a pattern, for example to view only the debug related settings:
Code:
./texturecache.py getsettings debug

You can set the value of a setting:
Code:
./texturecache.py setsetting locale.language Dutch

To enable or disable debug logging:
Code:
./texturecache.py debugon
and
Code:
./texturecache.py debugoff

The debugon/debugoff options are shortcuts for "setsettings debug.showloginfo True|False" and "setsettings debug.extralogging True|False", and should come in handy when you are several screens deep into an addon only to realise that it would be really handy if logging had been enabled... now you can enable it from ssh.
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.
Hi,

I have three OpenELEC clients, all three using MySQL for accessing the library.
Accessing MySQL works fine on all clients but my problem is fanart. On one of the RPi's I did not have any fanart at all. After a bit of googling I found this script.
Running it gave me errors (don't remeber what errors), so I deleted Texture13.db and rebooted OpenELEC.

I ran ./texturecache.py C and things started looking good.

Code:
Caching artwork: 11 items remaining of 345 (qs: 0, qm: 11), 334 errors, 2 threads active (00.84 d Caching artwork: 11 items remaining of 345 (qs: 0, qm: 11), 333 errors, 2 threads active (00.82 d Caching artwork: 9 items remaining of 345 (qs: 0, qm: 9), 336 errors, 2 threads active (00.84 dow Caching artwork: 9 items remaining of 345 (qs: 0, qm: 9), 335 errors, 2 threads active (00.82 dow Caching artwork: 7 items remaining of 345 (qs: 0, qm: 7), 337 errors, 2 threads active (00.82 dow Caching artwork: 6 items remaining of 345 (qs: 0, qm: 6), 338 errors, 2 threads active (00.82 dow --- The following items could not be downloaded: [poster    ] [Clash of the Titans 3D                  ] /storage/downloads/xbmc_videodb_2014-08-28/movies/Clash_of_the_Titans_3D_2010-poster.jpg [poster    ] [Cliffhanger                             ] /storage/downloads/xbmc_videodb_2014-08-28/movies/Cliffhanger_1993-poster.jpg [poster    ] [Cloudy with a Chance of Meatballs       ] /storage/downloads/xbmc_videodb_2014-08-28/movies/Cloudy_with_a_Chance_of_Meatballs_2009-poster.jpg [poster    ] [Closed Circuit                          ] /storage/downloads/xbmc_videodb_2014-08-28/movies/Closed_Circuit_2013-poster.jpg [poster    ] [Cloudy with a Chance of Meatballs 2 3D  ] /storage/downloads/xbmc_videodb_2014-08-28/movies/Cloudy_with_a_Chance_of_Meatballs_2_3D_2013-poster.jpg [poster    ] [Cloverfield                             ] /storage/downloads/xbmc_videodb_2014-08-28/movies/Cloverfield_2008-poster.jpg [poster    ] [Colombiana                              ] /storage/downloads/xbmc_videodb_2014-08-28/movies/Colombiana_2011-poster.jpg [poster    ] [Coming to America                       ] /storage/downloads/xbmc_videodb_2014-08-28/movies/Coming_to_America_1988-poster.jpg

I did infact manage to download a few fanarts but most failed. To me it seems like its trying to download fanart from local client instead of internet or am I wrong?

You talk about fanart being the problem when your posters are clearly also a problem, so that's a bit confusing.

Yes, somehow you've managed to load your shared media library using references to local /storage - that's great for the client on which you have scraped the media, but useless for all others.

Did you export/import your library? That's got known problems, see this thread.

You need to fix your media library so that all clients have access to the same artwork using smb:// or nfs:// urls. The mklocal.py script could help fix your artwork if that is all that is "broken", search this thread for the mklocal posts.
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.
Thank you for your answer. That led me in the right direction.
I exported the library to several files and re-added the folder from local .nfo's. After doing that I ran texturecache.py on the local clients.. and viola... all is good.
(2014-08-30, 18:57)Milhouse Wrote: @HyperEscape: I replied in the other thread where you posted this and I'm still waiting for a response.

Hello

My response is here.
@Milhouse: thanks for previous efforts with top250 imdb, very helpful to automate.

I'm having an issue when hooking this script up to my xbmc-server headless (has json, web server running) to automate syncing of Thumbnails without having to turn on xbmc boxes... On my windows boxes The 'c' function works great to download new Thumbnails, but on linux I just can't seem to get them to work. It doesn't create Thumbnail subfolders or files. The script output (and log) indicate successful caching.

Things I've tried to resolve the issue:
- I did try and hook the linux texturecache.cfg to a windows xbmc that works from the windows py script, but that also didn't work.
- Check user file/folder permissions
- Create Thumbnails subfolders in case script didn't support them missing
- Review cfg (mimicked the one in wiki exactly)
- Added logging (no errors seen)
- Ran mlocate update, tried to locate images (to verify they weren't going somewhere else)
- Ran script as root

Any other suggestions as to why linux would not write the images out?
@pgjensen: I'm a bit confused. You're trying to update the local texture cache for a client, when that client isn't switched on?

OK... I'm pretty sure that's not possible, unless the Textures13.db file and Thumbnails folders are both network accessible for each client, but then what client are you using to update the Textures13.db and Thumbnails folder - your headless server?

Can you explain in a little more detail how you have this working?

The "Linux" folders not being created (by what - the Linux client? Or the headless server?) suggests a basic permissions/configuration issue. If it appears to be working, ie. artwork is being cached, then the "Linux client" is caching its artwork somewhere else, and not where you think it is being cached.

You could try uploading your texturecache.cfg and the texturecache logfile while pre-loading the cache for one of your Linux clients and I'll take a look, but I really don't think this is something that can be made to work without a lot of faffing about.

You're better off just waking each client from suspend, using the client to pre-load it's own cache, then putting the client back to sleep. No need to put the database and folders on the network, which is not good for performance anyway.

Or refresh the local texture cache (Textures13.db+Thumbnails folder) using rsync from a "master" texture cache whenever the Linux clients boot, it will only take a few seconds to sync each time. Of course this does assume that all clients have the exact same imageres/fanartres configuration, which isn't a problem when each client manages their own cache.
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.
@Milhouse:

I use a shared MySQL db.

I turned on all machines.

On the linux box, where xbmc has its own install, I pointed texturecache.cfg locally. It connects fine. It acts like it's working, but doesn't. I tried running as root (to avoid permissions errors) and no luck.
On the linux box, I pointed textxurecache.cfg remotely to one of my powered on xbmc windows boxes (over http/rpc) but pointed locally to userdata/Thumbnails.
Next step: try pointing windows cfg to the linux box to see if it works?

I'm trying to avoid the automatic client wake/suspend since they're in bedrooms and I also have HDMI handshaking issues with some when they're not turned on in the right order. If I use my linux server (in basement) to do this, I can use rsync when the boxes turn on.

Can I PM you the cfg/logs so they're not out in the open?
Sure, PM me the cfg/log though I'd rather continue the discussion in public.
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.
Done, no problem!
Hi Millhouse,

For a noob who doesn't know anyhting about python, do you have a couple of pointers in to how I run this? I've installed python, saved the .py but when I open the window and type in the command line it just errors? Presumably I have to place the .py somewhere specific for it to be found? and do I need the .cfg at all i.e. the db location xmbc location or will it work without a .cfg?

Sorry, but complete noob with pyhton so thought it best to ask before doing something stupid to my install of XBMC.

Thanks, Mike.
RIP Schimi2k, we miss you.
When I grow up I want to be a skilled skinner
Thank me by ⬇ adding to my + reputation
You don't need to place the .py anywhere specific, nor do you need a .cfg file. When running the py file on the same machine that runs xbmc, the default settings should be good enough. If not, then create a .cfg and add the settings you need to change - don't go mad setting everything under the sun.

It's hard to say what error you are getting, without being psychic - maybe upload a screenshot or copy/paste what you see in your console so I've got a clue.

Make sure you haven't downloaded a web page instead of the source code - open the py file in an editor, if it's full of HTML you've downloaded the wrong file. Download the "raw" file.

Assuming you're running Windows, if you haven't added the location of the Python binary to your PATH variable you'll need to include "drive:\path\to\python\python.exe" when calling texturecache.py.
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.
Thanks Millhouse.

Will try again and yes sorry for not including the actual error, forgot to capture it at the time. Will do if problems still continue.
RIP Schimi2k, we miss you.
When I grow up I want to be a skilled skinner
Thank me by ⬇ adding to my + reputation
@millhouse

Even tough this is totally not a script issue, I wanted to make you aware that when triggering any clean actions like vclean, during playback of video, that a dialog for xbmc pops up over the playback. I thought this type of thing was already fixed in current helix kodi and older xbmc versions, so I guess this is some sort of regression.
(2014-09-13, 15:45)uNiversal Wrote: @millhouse

Even tough this is totally not a script issue, I wanted to make you aware that when triggering any clean actions like vclean, during playback of video, that a dialog for xbmc pops up over the playback. I thought this type of thing was already fixed in current helix kodi and older xbmc versions, so I guess this is some sort of regression.

Thanks, yes although not sure if the progress bar over video is a regression or not, however I certainly know that cleaning offline sources with JSON will result in annoying "Keep/Remove?" prompts which is rather unfortunate as it's quite likely there will be nobody present to answer the prompts. Both issues however are fixed by PR5324 which hasn't yet merged into master.

Once this PR merges - and it's already in my OpenELEC test builds - the default behaviour will be for JSON clean/scans (ie. vclean/vscan) to be totally silent as far as the GUI dialogs and progress bars are concerned.

I intended to add a configuration setting that will allow texturecache.py to enable GUI dialogs/progress during vclean/vscan if that is what the user requires - unfortunately this change is dependent on the JSON API version which has currently been bumped to 6.18.2 but could change again before PR5324 is merged so I'm loath to release the changes to texturecache.py until PR5324 is merged and the API version is locked in...
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.
•
• 1
• 70
• 71
• 72(current)
• 73
• 74
• 186
•