•   
  • 1
  • 106
  • 107
  • 108(current)
  • 109
  • 110
  • 179
  •   
[RELEASE] Texture Cache Maintenance utility
Hi Milhouse, thx.
I think that my cache doesn't work properly for this reason:

every time that I browse my movies library, I see the big poster (on the right of GUI) and fanart (like background)... so, ideally now they should be downloaded in my Thumbails folder cache, right?

But if I use "./texturecache.py jd movies any_media", seems that Kodi continues to search posters and fanarts on the Web, and not from my local path:

Code:
"fanart": "image:[b]//http://[/b]
"poster": "image:[b]//http:// [/b]

To solve, I have to locally download all the artworks, with a command like this?

Code:
./texturecache.py jd movies | mklocal.py --local [b]/storage/.kodi/userdata/Thumbnails[/b] --prefix [b]nfs://192.168.1.68/volume1/FILM/[/b] --artwork fanart poster clearlogo clearart --output fixup.dat

Milhouse Wrote:This type of artwork can only be extracted (and eventually cached) by a GUI process, ie. navigate using the GUI to the item in your library and display it - the artwork should be extracted/cached.
I tryed to solve the "Ignored" issue. I opened the albums informations to see a big image of it, but restarting "./texturecache.py c", I still have 36 ignored.

Code:
|    banner   |    fanart   |    poster   |    thumb    |  thumbnail  |    TOTAL
--------------+-------------+-------------+-------------+-------------+-------------+-------------
Cached        |      -      |      1      |      -      |      -      |      1      |      2
Deleted       |      -      |      -      |      -      |      -      |      -      |      0
Duplicate     |     868     |     1929    |     861     |      -      |      58     |     3716
Error         |      -      |      2      |      1      |      -      |      2      |      5
Ignored       |      -      |      -      |      -      |      -      |      36     |      36
Season-all    |      -      |      -      |      5      |      -      |      -      |      5
Skipped       |      52     |     788     |     538     |     805     |     1488    |     3671
Undefined     |      -      |     284     |      -      |      -      |     358     |     642
==================================================================================================
TOTAL         |     920     |     3004    |     1405    |     805     |     1943    |     8077
Download Time |      -      | 00:00:01.54 | 00:00:01.57 |      -      | 00:00:00.03 | 00:00:03.82

And please, another noob question Big Grin
why I have a so high number in "Duplicate" and "Skipped"? It's normal?
Thx a lot
Reply
(2015-08-22, 18:24)lollo78 Wrote: I think that my cache doesn't work properly for this reason:

every time that I browse my movies library, I see the big poster (on the right of GUI) and fanart (like background)... so, ideally now they should be downloaded in my Thumbails folder cache, right?

But if I use "./texturecache.py jd movies any_media", seems that Kodi continues to search posters and fanarts on the Web, and not from my local path:

Code:
"fanart": "image:[b]//http://[/b]
"poster": "image:[b]//http:// [/b]

The media library urls (ie. those being reported by "jd movies") will not change once artwork is cached, they'll always remain the same - caching has no effect on the contents of the media library (ie. MyVideosXX.db, MyMusicXX.db).

(2015-08-22, 18:24)lollo78 Wrote: To solve, I have to locally download all the artworks, with a command like this?

Code:
./texturecache.py jd movies | mklocal.py --local [b]/storage/.kodi/userdata/Thumbnails[/b] --prefix [b]nfs://192.168.1.68/volume1/FILM/[/b] --artwork fanart poster clearlogo clearart --output fixup.dat

No - your Thumbnails folder is *NOT* your local storage!

The Thumbnails folder is part of your texture cache, which is completely separate from where your original artwork is located. Your original artwork may be stored locally (eg. on your NAS) or remotely on the internet, and once you display this artwork in Kodi another - and separate - version of this original artwork will be added to your Thumbnails cache in the Thumbnails folder.

If you want to create "local" artwork you should be specifying the location of your media (ie. movie files) as the --local argument, eg.. --local /media/Volume1/FILM.

I've already said you need to use an NFS mount for --local if you are running mklocal.py on OpenELEC, so mount your media using NFS and use that path.

Once you have converted your remote artwork to local artwork, you can cache the new local artwork (texturecache.py c) - the media library urls will have changed so your cache needs updating with the new urls - and prune the old remote artwork (texturecache.py P) from the cache.

Milhouse Wrote:I tryed to solve the "Ignored" issue. I opened the albums informations to see a big image of it, but restarting "./texturecache.py c", I still have 36 ignored.

Because, again, the original media library url won't change after you cache artwork so these embedded urls will continue to be ignored by the script until the media libary urls are replaced by a non-embedded url (you'd need to manually create local artwork alongside your albums, usually as cover.jpg, and then change the album thumb using the GUI "Get thumb").

Milhouse Wrote:And please, another noob question Big Grin
why I have a so high number in "Duplicate" and "Skipped"? It's normal?
Thx a lot

1661157 (post)
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,

Thanks for making this excellent tool.

I have two OpenELEC machines, a PC player/server which stores the media and a Raspberry Pi 2 player in another room.

I've exported the media library to separate files on the server, so everything has associated nfo and artwork files.

I've installed MySQL server on the PC and let Kodi create fresh MySQL video and music databases. I then added the media sources. My skin displays random movie/tv fanart on the home screen and this is working.

It appears that my chosen fanart and posters were correctly imported and cached. Kodi did not import the associated clearart, banner, discart, landscape and clearlogo image files (downloaded by Artwork Downloader), so I used texturecache.py with mklocal.py with the following command.

Code:
./texturecache.py jd movies | ./mklocal.py --readonly --local /storage/pool --prefix /storage/pool --artwork clearart banner discart landscape clearlogo --singlefolders --output | ./texturecache.py set

This worked great.

Now for the Pi2. I've configured it to access the MySQL db. The skin is not showing Random fanart, presumably because none of the artwork has been cached yet. I would like to cache the images that I already have on the server to the Pi2s local storage. Is it possible to use texturecache.py to accomplish this? When I run ./texturecache.py c it appears that it is downloading new artwork from the internet, but I'm not sure. How can I check?

If I run ./texturecache.py jd movies the artwork locations begin with "image:///storage/pool/movies", but there are 1300 movies so I can't verify that they are all like this.

Media files referenced in the db point to the local files e.g. /storage/pool/movies/Movie 1 (2015)/Movie 1 (2015).mkv

The Pi2 uses path substitution to translate this to the appropriate Samba path, like follows:
Code:
<substitute>
    <from>/storage/pool/</from>
    <to>smb://user:[email protected]/</to>
  </substitute>

Many thanks
Reply
(2015-08-24, 20:26)hugepants Wrote: Is it possible to use texturecache.py to accomplish this?

Yes.

(2015-08-24, 20:26)hugepants Wrote: When I run ./texturecache.py c it appears that it is downloading new artwork from the internet, but I'm not sure.

What makes you think that? Artwork that can't be cached (because the artwork can't be accessed by Kodi) will be listed at the end, or enable the log which will have details of what is and what isn't being cached.

(2015-08-24, 20:26)hugepants Wrote: How can I check?

Code:
./texturecache.py jd movies | ./mklocal.py --check all
will report any "remote" (http, https) artwork.

(2015-08-24, 20:26)hugepants Wrote: The Pi2 uses path substitution to translate this to the appropriate Samba path, like follows:
Code:
<substitute>
    <from>/storage/pool/</from>
    <to>smb://user:[email protected]/</to>
  </substitute>

And there's your problem, most likely. You should have used an smb:// source when scanning the library which would have made the path substitution unnecessary. Check your kodi.log for errors, either when playing movies or caching/displaying artwork - chances are your path sub isn't working as you expect it to.

By the way, you can also get rid of the [email protected]Pass if you add your username and password to passwords.xml.
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
Ok, this is exactly what I've been looking for to correct the black screen that comes up on my main menu when "Random Movies" is set as my background. The only problem: I have no freaking clue how to work this... Anyone know of a "How to" for dummies like me? Your help is much appreciated!
Reply
(2015-08-25, 18:52)AudioBeast Wrote: Ok, this is exactly what I've been looking for to correct the black screen that comes up on my main menu when "Random Movies" is set as my background. The only problem: I have no freaking clue how to work this... Anyone know of a "How to" for dummies like me? Your help is much appreciated!

Why does it need correcting in the first place? This usually means you've done something wrong to cause the problem, such as using path substitution in an attempt to share thumbnails between multiple clients. Re-caching may only prove to be a temporary solution unless the root cause is identified and resolved, and for that you need to provide more detail/upload a debug log (wiki).
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-08-25, 19:00)Milhouse Wrote:
(2015-08-25, 18:52)AudioBeast Wrote: Ok, this is exactly what I've been looking for to correct the black screen that comes up on my main menu when "Random Movies" is set as my background. The only problem: I have no freaking clue how to work this... Anyone know of a "How to" for dummies like me? Your help is much appreciated!

Why does it need correcting in the first place? This usually means you've done something wrong to cause the problem, such as using path substitution in an attempt to share thumbnails between multiple clients. Re-caching may only prove to be a temporary solution unless the root cause is identified and resolved, and for that you need to provide more detail/upload a debug log (wiki).

I will provide that once I am home. I was directed to this thread because multiple users seem to have had this issue. Many users keep recommending your tool as a fix:

183824 (thread)
Reply
(2015-08-25, 19:57)AudioBeast Wrote: I will provide that once I am home. I was directed to this thread because multiple users seem to have had this issue. Many users keep recommending your tool as a fix:

183824 (thread)

Thanks for the link, certainly sounds like the problem may in fact be with the Random Movie widget, perhaps accessing artwork in a slightly unorthodox manner.

To cache all uncached movie artwork you just need to execute "texturecache.py c movies" (see installation instructions in first post).
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-08-26, 01:10)Milhouse Wrote: Thanks for the link, certainly sounds like the problem may in fact be with the Random Movie widget, perhaps accessing artwork in a slightly unorthodox manner.

To cache all uncached movie artwork you just need to execute "texturecache.py c movies" (see installation instructions in first post).

Thanks Milhouse, I'll give it a go!
Reply
Thanks for the help.

(2015-08-24, 22:30)Milhouse Wrote: What makes you think that? Artwork that can't be cached (because the artwork can't be accessed by Kodi) will be listed at the end, or enable the log which will have details of what is and what isn't being cached.
I assumed that "downloads per second" indicated that artwork was being downloaded from the internet, but I now realise that it can be from a local source.

(2015-08-24, 22:30)Milhouse Wrote: ...will report any "remote" (http, https) artwork.
All artwork is local.

(2015-08-24, 22:30)Milhouse Wrote: And there's your problem, most likely. You should have used an smb:// source when scanning the library which would have made the path substitution unnecessary. Check your kodi.log for errors, either when playing movies or caching/displaying artwork - chances are your path sub isn't working as you expect it to.
The path substitution was working fine for playing movies with no apparent errors, and the caching also appeared to be OK, but to be safe I have deleted the MySQL db and re-scanned the library with the smb:// source. As the PC is my main player and server, when playing movies on this now the 'smbd' process uses up to 1% of the CPU and skipping through the movie is a bit laggy compared to playing straight off /storage/pool. But I'd rather have it set up like this if it's the correct way to do it.

(2015-08-24, 22:30)Milhouse Wrote: By the way, you can also get rid of the [email protected]Pass if you add your username and password to passwords.xml.
Done. Thanks.
Reply
Will this works as a service to clear the texture cache every X seconds? I use Kodi as an informative point and I have some home backgrounds showing useful text that changing every 30 seconds (made with Imagemagick).
Reply
(2015-08-25, 19:57)AudioBeast Wrote:
(2015-08-25, 19:00)Milhouse Wrote:
(2015-08-25, 18:52)AudioBeast Wrote: Ok, this is exactly what I've been looking for to correct the black screen that comes up on my main menu when "Random Movies" is set as my background. The only problem: I have no freaking clue how to work this... Anyone know of a "How to" for dummies like me? Your help is much appreciated!

Why does it need correcting in the first place? This usually means you've done something wrong to cause the problem, such as using path substitution in an attempt to share thumbnails between multiple clients. Re-caching may only prove to be a temporary solution unless the root cause is identified and resolved, and for that you need to provide more detail/upload a debug log (wiki).


I will provide that once I am home. I was directed to this thread because multiple users seem to have had this issue. Many users keep recommending your tool as a fix:

183824 (thread)

I looked at some of these threads, seems like the issue is in Aeon Nox 5? Taking a quick look and it seems like that skin is using script.grab.fanart to get the background image on home screen. If so IIUC that addon doesn't use cached art at all (in fact that I guess is the point of the addon), instead makes JSON queries into database (assume art tables) and gets the art itself then sets properties for the skin to use in showing the background art. It looks like there are a couple settings for the addon you might look at (Refresh Time / Mode).

scott s.
.
Reply
(2015-08-26, 19:52)effe Wrote: Will this works as a service to clear the texture cache every X seconds? I use Kodi as an informative point and I have some home backgrounds showing useful text that changing every 30 seconds (made with Imagemagick).

You can remove entries from the texture cache automatically if you know the urls of the artwork you want to remove - have a look at the purge option.

For example:
Code:
texturecache.py purge all informationpoint
will remove all cached artwork with urls containing the text "informationpoint", so if the path (url) for your backgrounds contains "informationpoint" then this should do what you require - each time you generate a new image you can just purge the texture cache of your backgrounds. Bit of a brutal solution, though. Smile

Edit: If you're going to run texturecache.py every 30 seconds in an embedded-type environment I would strongly recommend you disable the automatic version check/update mechanism by adding "checkupdate = no" to texturecache.cfg (or adding "@checkupdate=no" on the command line), not only because it would avoid unnecessary internet usage and hits on github.com, but also because you probably don't want unexpected behaviour changes due to a new version downloading itself automatically. Should you ever need to update, manually run "texturecache.py update".
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-08-26, 01:10)Milhouse Wrote: Thanks for the link, certainly sounds like the problem may in fact be with the Random Movie widget, perhaps accessing artwork in a slightly unorthodox manner.

To cache all uncached movie artwork you just need to execute "texturecache.py c movies" (see installation instructions in first post).

Thanks, Milhouse! The script worked smoothly and fixed my problem. If I may add a suggestion of adding "How to run a python script for noobs" to your installation instructions. This site helped me figure it out, as well as several YouTube videos. Thanks again!

http://pythoncentral.io/execute-python-s...ile-shell/
Reply
(2015-09-01, 17:22)AudioBeast Wrote: If I may add a suggestion of adding "How to run a python script for noobs" to your installation instructions.

Thanks, link added to installation section.
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
  • 106
  • 107
  • 108(current)
  • 109
  • 110
  • 179
  •   
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average



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