[RELEASE] Texture Cache Maintenance utility
(2015-09-05, 08:29)Milhouse Wrote:
(2015-09-05, 06:50)denywinarto Wrote: Sorry, was referring to texturecache.py... So this script is strictly for MySQL usage only?

No, it doesn't matter what your backend database is, either MySQL or SQLite, as the script uses JSON to communicate with Kodi. It's just that MySQL is a typical use-case for texturecache.py as the non-scraper clients in a MySQL environment will benefit from having their cache pre-loaded after new media is scraped.

(2015-09-05, 06:50)denywinarto Wrote: I wont need to scrape 25 times,
I just need to scrape once in the diskless server,
then after client restarts (to reload the image) they will have the same exact library.
It's been working that way for online games that has similar method of updating files,
so i'm sure it will work for Kodi as well

That's why for my case i think it's the same as local usage,
I just need to make the thumbnails load faster in the diskless server..
From your post i assume i have to run it everytime i update the library?

Unlike games, Kodi will be updating its "local storage" which is not static, like perhaps a game would be. From this latest description it doesn't sound like the client is persistent at all, with the client receiving a new copy of the "master" environment each time it boots, so if you just scrape on the server then I don't think you'll need texturecache.py (at least, not to pre-load the cache as this usually isn't necessary on a scraper client, as the scraper client is able to maintain it's own texture cache while it scrapes), although it wouldn't do any harm to run it after a scrape just to be sure the texture cache is fully up to date.

Just make sure each client receives a *unique copy* of the environment as you don't want clients updating shared data (potential for SQLite data corruption, etc.). However since you refer to it as an "image" I'm assuming that any modifications written to the image by the client are not persisted and won't affect any other client, which should then be fine.

Also, the cached thumbnails (generated by your diskless server) are potentially platform specific, so all your clients should be identically configured including similar hardware (usually not a problem if all x86, but can be an issue when mixing x86 and ARM). Just something to be aware of.

You might still benefit from running mklocal.py after a scrape, it really depends how you are sourcing your artwork and whether you want them all to be local (in the absence of local artwork, Kodi will find and use remote artwork). If you do convert any remote artwork to local using mklocal.py, you will need to update the texture cache with the new local artwork so your diskless server workflow would be:
  1. Scrape new media
  2. mklocal.py ...
  3. texturecache.py c

Automating this is pretty straight forward so that it runs on a regular basis (cron), or as new media is detected (polling your library for changes), or just as a one-click script - the choice is yours (and for you to implement!) You can also use texturecache.py to initiate a video library scan with "texturecache.py vscan", so you don't need to go near the Kodi GUI.

Sorry for the late reply, was trying to figure out the best scenario for my case,
I found another alternative, I just remembered i could fetch the artwork using filebot and store them in library folders..
And name them according to xbmc standars, e.g posters.jpg, banners.jpg

My question is, which one give better performance for diskless case like me?
1. Store the artwork in the ubuntu server inside the library (inside the movie and tvshow folders) OR
2. Store them in thumbnails folder in userdata, the diskless program creates cache for each client,
so theoretically this should give less burden to the traffic compared to the first option..
But i'm not sure how artwork fetching works in xbmc.. (and how it will the affect to the performance)

I have roughly 7000 movies and 500 tvshows, i store them alphabetically
Lastly, can this script copy the artwork stored in library using filebot to thumbnails folder?
Reply


Messages In This Thread
Crash on Gotham on OS X - by desepticon - 2014-05-29, 17:57
RE: [RELEASE] Texture Cache Maintenance utility - by denywinarto - 2015-09-09, 14:07
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