•   
  • 1
  • 82
  • 83
  • 84(current)
  • 85
  • 86
  • 178
  •   
[RELEASE] Texture Cache Maintenance utility
(2015-01-14, 17:30)xirederf Wrote: Is there a way to reduce the scop of the prune option to the movies only ?

The entire cache has to be compared against the entire media library in order to work out what type of thumbnail it is that you have in your cache, and whether it can be deleted or not. There's currently no option to limit this processing to only movies, but it would still have to load all the other media library objects even if such a limit were implemented.

If you want to keep pictures, you may want to try setting "prune.retain.pictures=yes" in the config.

(2015-01-14, 17:30)xirederf Wrote: PS : I'm using a raspberry Pi and have the latest Kodi helix on openelec.

EDIT : It just stoped with a "killed" :-( Will try it again with logs ... ?

Sounds like you're running out of memory and the script is being killed by the out of memory killer. 256MB or 512MB Pi? Try freeing up memory. Reducing gpu_mem might help, although this could then cause problems in Kodi if you go below ~100MB. Or enable swap, it might take a lot longer to run, but probably won't be killed.

If you're unable to free up enough memory, try running the script on a PC with the Pi as @xbmc.host (use the IP address of the Pi).
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
What would the best way be to remove all Fanart and actors images?
Reply
There's no easy option for this, mainly because I can't think why you'd want to do this.

You could try looking at the "purge" option which allows you to delete cached thumbnails based on a pattern, eg. "texturecache.py purge all 'http://thetvdb.com/banners/actors'" would delete the matching thumbnails, most likely actors. If your fanart is named with a specific pattern, eg. "*-fanart.jpg" then you could delete them all with purge.

Or just delete the entire cache (deleting both Textures13.db and the Thumbnails folder), then re-cache only posters (texturecache.py c @cache.artwork=posters).

Though I'd expect these items to automatically come back into your cache unless you remove the artwork from your media library. In which case case clearing them out of the cache becomes a whole lot easier.
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
(2015-01-14, 23:56)Milhouse Wrote: Sounds like you're running out of memory and the script is being killed by the out of memory killer. 256MB or 512MB Pi? Try freeing up memory. Reducing gpu_mem might help, although this could then cause problems in Kodi if you go below ~100MB. Or enable swap, it might take a lot longer to run, but probably won't be killed.

If you're unable to free up enough memory, try running the script on a PC with the Pi as @xbmc.host (use the IP address of the Pi).

It's a 512MB Pi and after a fresh reboot, it's says that I have 300MB free memory in the settings panel. How much memory does the script needs ?

Anyway, as you said, i tried it on a PC and it worked ! Thx for your fast and efficient answer :-)

Now i will try to figure ou t how the parameters work. It is simple for you (off course you created it) but for me, it is hard to understand what paramter goes with what command (i didn't find any website explaining all the possibilities with examples) ... but i will try because the possibilities are very interesting !
Reply
I have a (difficult ?) question : Is it possible to update fanarts of a film and force the update to be with the latest version of the film. For exemple, I have "The Great Gatsby" but by default, the scrapper chose the older version, not the last one. And, if it is possible, only the fanarts will be replaced, or does the script manage all the other informations (synopsis, actors, ...)

Thx.
Reply
You can re-cache specific artwork types with @cache.artwork= then provide a list of the artwork types you want cached, eg @cache.artwork=fanart,poster. You can also re-cache a single movie, or multiple movies.

However this script is not a scraper. It will only cache what is defined by your media library. If your media library is wrong, you need to fix that using other tools/techniques.

You can use mklocal.py to replace existing artwork with local artwork, so consider using a media manager to find the correct artwork and store it locally, then replacing becomes fairly easy.

And although the script can update some metadata with the imdb option, if you've scraped the wrong movie it's only going to continue updating the same movie with updated information. If you want to replace the movie with another different movie, just delete the existing movie from your library and scrape it correctly - use NFOs, or name it correctly (add the year to the media filename to avoid any scraper confusion).
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
Thx for this answer. I'm still trying to figure out what exactly this script does :-p
Reply
Can texturecache tell me which episodes of a single show have been watched, just dumped to terminal? For example:

Code:
./texturecache.py watched tvshows Scorpion

With the following output for unwatched:

Code:
Found: [Scorpion S01E14 (Charades)] UW

or for watched:

Code:
Found: [Scorpion S01E14 (Charades)] W

For me this would be a very handy feature. Would it be hard to implement?
Reply
Closest option is:

Code:
./texturecache.py query tvshows 'lastplayed != "" and playcount >= 0 and resume != ""' | sort -t= -k2d

which will return all watched episodes, sorted by date when last played. Filter by show with grep. Modify the query to find unwatched episodes (lastplayed == "" or playcount == 0 or resume == "").
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
Noob here...and needing some help.

I have both Amazon Fire TV box and stick running SPMC (XBMC Gotham 13.3). I'd love to use your utility, but I'm having difficulty understanding how to connect to the AFTVs when running Python and your script on my Windows 7 box. I read one post that said all I need to do is specify the IP address of the AFTV--but I'm not sure where/how to do this.

On my Win7 box, I have installed Python 2.7 and modified the PATH and PATHEXT variables.
I put texturecache.py and texturecache.cfg in the Python27 folder. From the command line, I type:

texturecache.py s "Sons of Anarchy"

and get:

FATAL: The task you wish to perform requires read/write file access to the XBMC sqlite3 Texture Cache database.
The following sqlitedatabase could not be opened: \sdcard\android/data\com.semperpax.spmc\files\.xbmc\userdata
Check settings in properties file texturecache.cfg, or upgrade your XBMC client to use a more recent version that supports Textures JSON API


I'm guessing I need to modify the texturecache.cfg file to tell texturecache.py where to look for the AFTV (e.g. on my local network, ip address 192.168.2.116). In texturecache.cfg, I've changed the userdata variable to /sdcard/android/data/com.semperpax.spmc/files/.xbmc/userdata and the xbmc.host variable to 192.168.2.116


I'm sure this is basic stuff, but I'd appreciate any help especially if it explains it in very direct steps easy for a noob to understand!
Reply
The problem is your AFTV is running an old version of XBMC, that doesn't support the Textures JSON API. Without the JSON API, which provides remote access to the texture cache, the script is forced to directly access the userdata folder of the AFTV. Since you're running the script on Windows, that's never going to work, as Windows can't mount the AFTV SD card.

Your best option is to run the script directly on the AFTV, so that the script has direct access to userdata, or upgrade the AFTV to Helix which does support the Textures JSON API.
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
Hello
Thanks for this script !
I try to run without success.
I enabled "Allow programs on this system to control XBMC" and "Allow programs on other systems to control XBMC" and the webserver on port 8080 and double check it.
But when I try to launch a
Code:
./texturecache.py p
I've got this reply :
Code:
FATAL: The task you wish to perform requires that the JSON-RPC server is
       enabled and running on the XBMC system you wish to connect.

       In addtion, ensure that the following options are ENABLED on the
       XBMC client in Settings -> Services -> Remote control:

            Allow programs on this system to control XBMC
            Allow programs on other systems to control XBMC

       A connection cannot be established to the following JSON-RPC server:
       localhost:9090

       Check settings in properties file texturecache.cfg

The log file, even with verbose enable, doesn't help me more....
Code:
2015-01-22 12:44:46.706911:MainThread: Command line args: ['./texturecache.py', 'p']
2015-01-22 12:44:46.707023:MainThread: Current version #: v1.8.7
2015-01-22 12:44:46.707053:MainThread: Current platform : linux2
2015-01-22 12:44:46.707085:MainThread: Python  version #: v2.7.6.0 (final)

I'm running the last Gotham stable build on ubuntu 14.04 (kernel 3.13.0-44-generic) with MySQL server on a Debian

Could you please help me finding the issue ?
Reply
Do you have webserver enabled?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
(2015-01-22, 13:58)nickr Wrote: Do you have webserver enabled?
Yes it is
Reply
Have you restarted Kodi after enabling the "Allow programs" options - sometimes Kodi fails to reconfigure the RPC server when the options are changed, a restart of Kodi usually fixes it.
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
  •   
  • 1
  • 82
  • 83
  • 84(current)
  • 85
  • 86
  • 178
  •   
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average



Logout Mark Read Team Forum Stats Members Help
[RELEASE] Texture Cache Maintenance utility4.7617