[RELEASE] Texture Cache Maintenance utility
(2013-07-02, 13:39)AnotherPhil Wrote: Ok, my understanding is ...

The [P]rune command deletes all orphaned images from the cache.

It's the [R]everse query option that locates "orphaned" files and removes them.

The role of Textures13.db is to act as an "index" for files in the Thumbnails folder using a "hash" identifier which is also the filename of each thumbnail file (eg. 2/276c1eb0.jpg). The "[R]everse lookup" option will scan the Thumbnails folder retrieving all of the hashes and then try to find the corresponding rows in the Textures13.db - hence the "reverse" nature of this option. Any thumbnail file for which a row can't be found will be considered an "orphan" and removed - without a row in Textures13.db such files are just wasting file space.

Orphaned files are rare, but most likely to appear following an upgrade (eg. Eden to Frodo) when old Eden thumbnails are left unreferenced by the updated Textures13.db used by Frodo.

The [P]rune option on the other hand will match cached files (ie. a row in Textures13.db) with the original artwork in the Media Library (MySQL etc.). Any cached file that cannot be matched to an artwork file in the Media Library will be removed.

Typically the files to be pruned are "preview" thumbnails and other transient artwork that may be downloaded by plugins (eg. BBC iPlayer episode thumbnails), but can also include artwork associated with movies and TV shows that have been removed from the media library.

(2013-07-02, 13:39)AnotherPhil Wrote: The [C]ache command issued for a particular movie, re-downloads & caches the movies' poster and fanart images from the existing URLs.


(2013-07-02, 13:39)AnotherPhil Wrote: What I'm after is a quick way to remove whatever remnants are left after issuing a JSON "VideoLibrary.RemoveMovie" command. i.e. Delete all the cached images & database records relating to the removed movie. Is this already possible with your script or is the logic there, but needs rejigging into another command?

If you know what artwork needs to be deleted, you could try the [s]earch option and then [d]elete cached items based on the row ids found by [s]earch, but it's unlikely you will know all of the artwork references to search for, in which case the current [P]rune option is still the best method - while slow, this will identify ALL of the artwork that is no longer referenced by the Media Library, including previously removed movies.

(2013-07-02, 15:18)wishie Wrote: So it seems I have a database (MySQL) full of incorrect URLs for thumbnails and other artwork.. so when I exported my library to NFOs, they now too contain invalid/incorrect URLs..

Is there a way I can simply tell your script to fetch everything new from the internet, ignoring the URLs in the NFO files?

Also, how to remove all the invalid entries from my database?

No, sorry - that's not how it works.

The URLs you have in your media library determine what artwork is cached and displayed by XBMC, so even if it were possible for this script to cache alternative URLs, XBMC would still be using the URLs specified by your media library and you'd just end up with both artwork URLs being cached and the artwork from the "incorrect" URLs still appearing on the display. In short, it would be a waste of time and disk space caching "alternative" URLs, as XBMC (driven by your media library) would know nothing about them.

Correcting the URLs in the Media Library is the only option, which you can of course do via the Info screen and "Choose Art" button, but assuming we're talking about more than just a handful of movies/tv shows this quickly becomes an impractical solution.

My advice would be to fix the URLs in the NFO files using a media manager such as Ember or alternatively delete all the NFO files if they're not worth keeping and you're happy with internet-sourced artwork; drop your MySQL databases (MyMusic and MyVideo); restart XBMC so that it re-creates empty databases; and then finally re-scrape your library.
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.

Messages In This Thread
RE: [RELEASE] Texture Cache Maintenance utility - by Milhouse - 2013-07-02, 22:31
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
This forum uses Lukasz Tkacz MyBB addons.