• 1
  • 157
  • 158
  • 159(current)
  • 160
  • 161
  • 197
[RELEASE] Texture Cache Maintenance utility
This script could check Kodi's database (textures.db or videos.db – whichever holds video file paths) and if absolute file path is known then directory which holds video file and fanart.jpg is known. Then simple file copy mechansim to corresponding Thumbnails folder (which again I think is stored in one of Kodi's database textures.db or videos.db).
Polish language translator/maintainer for Grid skin.
Reply
(2018-02-15, 17:03)Kolabor Wrote: @Milhouse 
Does TCMU script allows to auto grab "fanart.jpg" from seperate movie folder(s) and copy it automagically to corresponding Thumbnails folder (and swaping out lower resolution file that exists there)?

See this topic why I want to do that.

No, it doesn't support that, nor should it - the artwork that is cached is sometimes format converted (eg. from progressive jpg to non-progressive jpg) in addition to being resized, and bypassing the caching mechanism by stuffing the Thumbnails folder full of original artwork (that may not be hardware decodable) would be a really bad idea. Better to get whatever limits are in place updated in core Kodi.
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
Thanks milhouse. Sad
Polish language translator/maintainer for Grid skin.
Reply
I have re-scraped all my series and movies using Ember.
All new data (art and nfo) are stored on my NAS next to the video files.

When I want to update info info on my Kodi with the newly scraped data will the “-C” option do that or will that download everything again using the Kodi scrapers?
Reply
(2018-02-16, 18:10)BZwart Wrote: I have re-scraped all my series and movies using Ember.
All new data (art and nfo) are stored on my NAS next to the video files.

When I want to update info info on my Kodi with the newly scraped data will the “-C” option do that or will that download everything again using the Kodi scrapers?
You'll have to use mklocal.py utility to set your artwork to local artwork.

Then cache it.
Image Image
Reply
Thanks, I will check it out.
Reply
(2018-02-16, 18:10)BZwart Wrote: I have re-scraped all my series and movies using Ember.
All new data (art and nfo) are stored on my NAS next to the video files.

When I want to update info info on my Kodi with the newly scraped data will the “-C” option do that or will that download everything again using the Kodi scrapers?

You can use mklocal.py to download artwork to the local filesystem (and associate new local artwork with existing movies in the library).

However, if you want to recache artwork, then use -C movies|tvshows, and if you only want to recache artwork with a file timestamp modified within n days then specify @cache.refresh=n (where n is an integer, 0-99999 days, 0 is today, 1 is yesteday etc., or an absolute starting date, eg. '2018-01-01 00:00:00' would be interpreted as any modification >= "1 Jan 2018 00:00:00').

And if you want to re-import a modified NFO file (ie. refresh a movie) then use qax movies|tvshows @qa.nfo.refresh=n (same rules for n as @cache.refresh).
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
Howdy

I have kodi using the shared MySQL database.  Primary machine running kodi and the database with several RPI3 libreelec installs.   I use MediaElch to maintain movie library and download all art, .nfo etc and Sickrage for TVShows, so the KODI machine which is set to update the library uses the local scrapers.

I have just started running texturecache.py nightly as a cron on the RPI's to ensure all their thumbnails etc are kept clean etc, am I doing correctly? I  like the fact that I can start watching something and pic up again in another room, so I just want to make sure this is the best option?  sources are all lan accessible via smb, and all kodi instances use the same, along with the advance settings.

Also can you please share the syntax for the "./texturecache.py watched" flag? as I would like to export just this information, blow away the mysql, re-instate and re-scan clean, but I want to be able to restore the last watched, stop point etc.
Reply
(2018-03-02, 05:27)MystikWeb Wrote: I have just started running texturecache.py nightly as a cron on the RPI's to ensure all their thumbnails etc are kept clean etc, am I doing correctly?
You can do that, although it's often easier to run it on a single machine (such as your scraper) and pass the IP address (or host name) of the remote RPi client, eg.

Code:
./texturecache.py @kodi.host=192.168.0.101 c movies
./texturecache.py @kodi.host=192.168.0.102 c movies
./texturecache.py @kodi.host=192.168.0.103 c movies

You can also configure all of your clients in a single texturecache.cfg using "sections", eg.
Code:
[lounge]
kodi.host=192.168.0.101

[bedroom]
kodi.host=192.168.0.102

[kitchen]
kodi.host=192.168.0.103

and then:
Code:
./texturecache.py @section=lounge c movies
./texturecache.py @section=bedroom c movies
./texturecache.py @section=kitchen c movies

etc.

(2018-03-02, 05:27)MystikWeb Wrote: Also can you please share the syntax for the "./texturecache.py watched" flag?

To backup your watched movie and tvshow status:
Code:
./texturecache.py watched movies backup /tmp/movies.dat
./texturecache.py watched tvshows backup /tmp/tvshows.dat

To restore your watched movie and tvshow status:
Code:
./texturecache.py watched movies restore /tmp/movies.dat
./texturecache.py watched tvshows restore /tmp/tvshows.dat

Edit: Obviously, make sure you don't lose the /tmp/movies.dat and /tmp/tvshows.dat files - where you create them is up to you.
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
Hi Ho,

I found this wonderful Script the other day and actually have the same setup as the MystikWeb. Well almost, I set up a MySQL Database last week since I installed a second Kodi. I have two Pi's with Libreelec and a 3rd with Raspbian installed (MySQL and some others stuff).
I'm planning to also do the same, keep the Artworks etc. in Sync and pre Cache them and delete orphaned stuff. Your input to install it on the Scraper and manage it remote is actually pretty great. I just have 2-3 (tiny) Questions which are easy for you I believe Smile

1) When setting the Script on the Scraper, does it make sense to actually add an Option for it to run pre caching on itself? My guess would be no, because the Artwork is downloaded via Artwork Beef. I would just use Option R here to delete orphaned files.
2) My idea is to Cache the Non Scraper + delete orphaned files remotely with Sections for movies and shows, am I right that Option c and R are the ones here to use? Can I do it in one statement with Movies and Shows or are 2 statemens necessary?
3) I'd like to run it at Night, does the actual Source need to be on? To explain, I have my Files on Shares which are off at night/not accessable. Artworks are on the PI and not stored with the Files.

Thank you Smile
Reply
(2018-03-03, 23:43)D-m-x Wrote: 1) When setting the Script on the Scraper, does it make sense to actually add an Option for it to run pre caching on itself? My guess would be no, because the Artwork is downloaded via Artwork Beef. I would just use Option R here to delete orphaned files.
2) My idea is to Cache the Non Scraper + delete orphaned files remotely with Sections for movies and shows, am I right that Option c and R are the ones here to use? Can I do it in one statement with Movies and Shows or are 2 statemens necessary?
3) I'd like to run it at Night, does the actual Source need to be on? To explain, I have my Files on Shares which are off at night/not accessable. Artworks are on the PI and not stored with the Files.

Thank you Smile

1) If you were only using the standard scrapers then my answer would be not really, as the scrapers should cache the artwork they scrape. However if you are using an addon such as Artwork Beef to acquire additional artwork then this may or may not cache the artwork it assigns to movies.
2) Orpaned ("R") is one of the few options that require direct file system access, and so doesn't work remotely - you would need to mount the remote filesystem, or copy the script to the client and then run it on the client (the latter is relatively easy to achieve using scp and ssh)
3) The artwork files will need to be accessible (and able to be read), the movies will not.
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
(2018-03-04, 00:59)Milhouse Wrote:
(2018-03-03, 23:43)D-m-x Wrote: 1) When setting the Script on the Scraper, does it make sense to actually add an Option for it to run pre caching on itself? My guess would be no, because the Artwork is downloaded via Artwork Beef. I would just use Option R here to delete orphaned files.
2) My idea is to Cache the Non Scraper + delete orphaned files remotely with Sections for movies and shows, am I right that Option c and R are the ones here to use? Can I do it in one statement with Movies and Shows or are 2 statemens necessary?
3) I'd like to run it at Night, does the actual Source need to be on? To explain, I have my Files on Shares which are off at night/not accessable. Artworks are on the PI and not stored with the Files.

Thank you Smile

1) If you were only using the standard scrapers then my answer would be not really, as the scrapers should cache the artwork they scrape. However if you are using an addon such as Artwork Beef to acquire additional artwork then this may or may not cache the artwork it assigns to movies.
2) Orpaned ("R") is one of the few options that require direct file system access, and so doesn't work remotely - you would need to mount the remote filesystem, or copy the script to the client and then run it on the client (the latter is relatively easy to achieve using scp and ssh)
3) The artwork files will need to be accessible (and able to be read), the movies will not. 
Got it, thank you, you've been very helpful Smile
Seems easy to set up now.
Reply
(2018-03-02, 19:50)Milhouse Wrote: To backup your watched movie and tvshow status:
Code:
./texturecache.py watched movies backup /tmp/movies.dat
./texturecache.py watched tvshows backup /tmp/tvshows.dat

To restore your watched movie and tvshow status:
Code:
./texturecache.py watched movies restore /tmp/movies.dat
./texturecache.py watched tvshows restore /tmp/tvshows.dat

Edit: Obviously, make sure you don't lose the /tmp/movies.dat and /tmp/tvshows.dat files - where you create them is up to you. 
Thanks for that, I tried the export and looked through the file, and I can see a discrepancy with whats actually in the DB which is interesting, so I will be doing the watched export, removing the DB and start source imports again, then re-apply the watched items hopefully that cleans it up.  as I have a a few shows, where in "hide watched shows" its showing the show, with all titles available, but when go into show, nothing is there as they are correctly flagged...
Reply
Hi Milhouse

could it be possible to add a 'reloadskin' option, which would run the XBMC.ReloadSkin command ?
IMHO it would be useful with skins based on widgets (wich are set to not auto refresh).

Thanks in advance for your answer Smile
Kodi 18.1 running on
- Nvidia Shield 2017
- Beelink GT1 Ultimate (S912 / 3Gb RAM) @ CoreELEC 9.0.1
- Mini M8S II (S905X / 2 Gb RAM) @ CoreELEC 9.0.1
Reply
(2018-03-07, 16:18)Fredouye Wrote: Hi Milhouse

could it be possible to add a 'reloadskin' option, which would run the XBMC.ReloadSkin command ?
IMHO it would be useful with skins based on widgets (wich are set to not auto refresh).

Thanks in advance for your answer Smile

I don't believe this is supported via JSON-RPC.
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
  • 157
  • 158
  • 159(current)
  • 160
  • 161
  • 197

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Texture Cache Maintenance utility17