• 1
  • 187
  • 188
  • 189(current)
  • 190
  • 191
  • 197
[RELEASE] Texture Cache Maintenance utility
Am I misunderstanding that P is the option to remove stale entries in Thumbnail/ directories?  I ran:

bash:
$ texturecache.py P @profile.name=Foo

but thumbnails it listed in column 2 of it's output are still on the disk.  Should they not be removed?
Reply
Hi all,

I've done a clean install of Kodi, restoring all my userdata config BUT textures13.db and /Thumbnails directory, as they're not backed up to save time/space, and as they should be recreate with no problem. Smile

Now I want to recreate all my artwork by doing "texturecache.py C". The thing is that fanart.tv is just letting me download a few images, and after that I get 503 errors. If I stop script and restart it again, I can download a few more... and so.

Is there any way to "slow down" download process so fanart.tv doesn't temporarily "ban" me? I've already set up only one thread for that site, so I don't know what more I can do.

Thanks a lot.
Reply
(2020-05-30, 20:59)J_E_F_F Wrote: The original post example shows ./texturecache.py c movies (with ./) but using that errors with ./texturecache.py not found.

Assuming you're using LibreELEC then texturecache.py is a built-in so you should omit the ./ - this is only needed when the script is in the current working directory.

(2020-05-30, 20:59)J_E_F_F Wrote: How can I correct my images problem?

It looks like the images are no longer available from tmdb.org - do any of those urls actually work in a browser? Maybe the recent tmdb.org API changes have resulted in new urls for artwork, and the old urls may no longer work? I'm guessing your texture cache has been purged (or deleted), but re-caching won't work now, because the artwork no longer exists - have you checked the kodi.log for errors to confirm the artwork cannot be retrieved (it's possible kodi may not log these errors - can't rememebr).

To be honest, this is the #1 problem when using remote artwork, and why I strongly recommend using only local artwork. Your best option would be to use mklocal.py (see link at bottom of first post) so that it removes the missing artwork and then use Artwork Beef to rescrape new artwork (and configure it to store the artwork locally, or use mklocal.py to convert any remote artwork to local artwork).
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
(2020-05-31, 15:53)shred00 Wrote: I want to regularly clean out stale thumbnails.  From what I understand I want the P option for that, and the p option is a "dry-run" version of that.  Am I correct so far?

If by "stale" you mean thumbnails that are no associated with movies, tvshows or music (ie. thumbnails associated with YouTube videos and other accumulated dross) then yes - that's the correct option.

(2020-05-31, 15:53)shred00 Wrote: is there a more efficient way to run it for all profiles at once?
No, however you can retrieve a list of all profiles on the client using texturecache.py profiles which you could potentially parse and iterate over in a script.

(2020-06-01, 13:21)shred00 Wrote: Am I misunderstanding that P is the option to remove stale entries in Thumbnail/ directories? I ran:

bash:
$ texturecache.py P @profile.name=Foo

but thumbnails it listed in column 2 of it's output are still on the disk. Should they not be removed?

The "P" option should remove cached artwork from the Thumbnails folder that is not associated with any music/movies/tvshows in your media library. It will not remove original artwork from your media folders (in case that's what you think it should be removing).

The script will be asking Kodi to remove the cached artwork from the Thumbnails folder so if the removal is not succeeding then first thing to check would be the kodi log - perhaps there's a file permission problem.

Failing that, can you run (I'm assuming you are using Linux):
bash:
$ texturecache.py P @profile.name=Foo @logfile=/tmp/tc.log
and then if cached artwork still isn't being removed upload /tmp/tc.log somewhere (preferably zipped) and send me the link.

Also be aware that each profile will have it's own Thumbnails folder so make sure you're checking the correct folder after running the P option.
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
(2020-06-01, 23:27)peque Wrote: Hi all,

I've done a clean install of Kodi, restoring all my userdata config BUT textures13.db and /Thumbnails directory, as they're not backed up to save time/space, and as they should be recreate with no problem. Smile

Now I want to recreate all my artwork by doing "texturecache.py C". The thing is that fanart.tv is just letting me download a few images, and after that I get 503 errors. If I stop script and restart it again, I can download a few more... and so.

Is there any way to "slow down" download process so fanart.tv doesn't temporarily "ban" me? I've already set up only one thread for that site, so I don't know what more I can do.

Thanks a lot.

Unfortunately not - this is another of the problems when using remote content. Sad
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
(2020-05-29, 18:45)Raytestrak Wrote: Is it possible to NOT process a certain source? I have 8Gb storage in my mediaplayer and 1Tb of photo's I use as a slideshow screensaver. To prevent them from being cached, they're mounted in my skin folder (which isn't cached).

texturecache.py sources shows it like this: pictures: Fotos: special://skin/_fotos/Public.

When I purge my texturecache, it still processes my pictures even though I have prune.retain.pictures = yes in my texturecache.cfg. Loading Pictures takes about 15-20 minutes to finish, but there's never anything to clear so I was wondering if I could bypass it all together. Would be a nice feature too ./texturecache -P <source>, but that's because I have pseudo OCD. Whenever I delete a movie for instance, I run texturecache.py Smile

purge != prune - there is a purge option which is very different to the P (prune) option! Smile

The problem with ignoring a source is that P is matching all cached artwork against all media library sources, and if you exclude a source then there's likely to be cached artwork (corresponding to the ignored source) that now doesn't have a matching media library entry and these items would then be removed (pruned).

I'm pretty sure that kodi *is* going to cache your photos (as it displays them, unless the screensaver is loading them in a way which bypasses the texture cache) so I think you do want to have the texturecache.py script consider your pictures source, otherwise your cached photos would be removed from the cache each time you run P (which means kodi will re-cache them next time they're displayed etc.).

You could try this test version of texturecache.py which ignores the Pictures source when pruning: http://ix.io/2o57 - download it and save it as ./test.py (don't forget chmod +x ./test.py) then run ./test.py p (not P!) and see if that wants to remove any of your photos - if not then I guess the screensaver isn't caching them, and I'll think about adding an option to ignore Pictures sources.
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
(2020-06-02, 05:52)Milhouse Wrote:
(2020-05-29, 18:45)Raytestrak Wrote: Is it possible to NOT process a certain source? I have 8Gb storage in my mediaplayer and 1Tb of photo's I use as a slideshow screensaver. To prevent them from being cached, they're mounted in my skin folder (which isn't cached).

texturecache.py sources shows it like this: pictures: Fotos: special://skin/_fotos/Public.

When I purge my texturecache, it still processes my pictures even though I have prune.retain.pictures = yes in my texturecache.cfg. Loading Pictures takes about 15-20 minutes to finish, but there's never anything to clear so I was wondering if I could bypass it all together. Would be a nice feature too ./texturecache -P <source>, but that's because I have pseudo OCD. Whenever I delete a movie for instance, I run texturecache.py Smile

purge != prune - there is a purge option which is very different to the P (prune) option! Smile

The problem with ignoring a source is that P is matching all cached artwork against all media library sources, and if you exclude a source then there's likely to be cached artwork (corresponding to the ignored source) that now doesn't have a matching media library entry and these items would then be removed (pruned).

I'm pretty sure that kodi *is* going to cache your photos (as it displays them, unless the screensaver is loading them in a way which bypasses the texture cache) so I think you do want to have the texturecache.py script consider your pictures source, otherwise your cached photos would be removed from the cache each time you run P (which means kodi will re-cache them next time they're displayed etc.).

You could try this test version of texturecache.py which ignores the Pictures source when pruning: http://ix.io/2o57 - download it and save it as ./test.py (don't forget chmod +x ./test.py) then run ./test.py p (not P!) and see if that wants to remove any of your photos - if not then I guess the screensaver isn't caching them, and I'll think about adding an option to ignore Pictures sources.

Haha. You're right ... there are thumbs in my texturecache. All these years I've been bending myself backwards with startup scripts, symbolic links and manual editting of guisettings.xml files.

Still, performance wise it would be cool to be able to prune only a certain source. Say you delete a tvshow, instead of pruning everything, you could just prune tvshows. Don't know if that's possible at all (and I would understand it would be too much trouble to implement, just because some random guy on the internet has an OCD Rofl)
CoreElec on a tn95 (s905x). Onkyo NR-656. Canton Movie CD-1000. LG 55B6V.

If it ain't broke: break it, fix it, repeat
Reply
(2020-06-02, 05:05)Milhouse Wrote:
(2020-06-01, 23:27)peque Wrote: Hi all,

I've done a clean install of Kodi, restoring all my userdata config BUT textures13.db and /Thumbnails directory, as they're not backed up to save time/space, and as they should be recreate with no problem. Smile

Now I want to recreate all my artwork by doing "texturecache.py C". The thing is that fanart.tv is just letting me download a few images, and after that I get 503 errors. If I stop script and restart it again, I can download a few more... and so.

Is there any way to "slow down" download process so fanart.tv doesn't temporarily "ban" me? I've already set up only one thread for that site, so I don't know what more I can do.

Thanks a lot.

Unfortunately not - this is another of the problems when using remote content. Sad  

This is why fanart.tv requests keeps returning 503 error every now and then:

https://twitter.com/fanartdottv/status/1...6035563520

The question is: could the script be modified somehow to respect this max speed of 3 requests a second? I assumed that 1 thread max could slow down the process... but I see it's not the case. Could it just add a config option to limit requests at 1/second for example?

I see it was an error to delete all my thumbnails... Sad
Reply
(2020-06-02, 05:05)Milhouse Wrote:
(2020-06-01, 23:27)peque Wrote: Hi all,

I've done a clean install of Kodi, restoring all my userdata config BUT textures13.db and /Thumbnails directory, as they're not backed up to save time/space, and as they should be recreate with no problem. Smile

Now I want to recreate all my artwork by doing "texturecache.py C". The thing is that fanart.tv is just letting me download a few images, and after that I get 503 errors. If I stop script and restart it again, I can download a few more... and so.

Is there any way to "slow down" download process so fanart.tv doesn't temporarily "ban" me? I've already set up only one thread for that site, so I don't know what more I can do.

Thanks a lot.

Unfortunately not - this is another of the problems when using remote content. Sad

I periodically export my db including fanart, but I also recently had to rebuild my sql database. When using the c parameter, does it first check for local fanarts / thumbs before looking online? Also, but this probably has nothing to do with this utility: if I remove stuff from my library, I (sometimes) still see references in the path and/or art tables in the database.
CoreElec on a tn95 (s905x). Onkyo NR-656. Canton Movie CD-1000. LG 55B6V.

If it ain't broke: break it, fix it, repeat
Reply
(2020-06-02, 09:19)peque Wrote:
(2020-06-02, 05:05)Milhouse Wrote:
(2020-06-01, 23:27)peque Wrote: Hi all,

I've done a clean install of Kodi, restoring all my userdata config BUT textures13.db and /Thumbnails directory, as they're not backed up to save time/space, and as they should be recreate with no problem. Smile

Now I want to recreate all my artwork by doing "texturecache.py C". The thing is that fanart.tv is just letting me download a few images, and after that I get 503 errors. If I stop script and restart it again, I can download a few more... and so.

Is there any way to "slow down" download process so fanart.tv doesn't temporarily "ban" me? I've already set up only one thread for that site, so I don't know what more I can do.

Thanks a lot.

Unfortunately not - this is another of the problems when using remote content. Sad   

This is why fanart.tv requests keeps returning 503 error every now and then:

https://twitter.com/fanartdottv/status/1...6035563520

The question is: could the script be modified somehow to respect this max speed of 3 requests a second? I assumed that 1 thread max could slow down the process... but I see it's not the case. Could it just add a config option to limit requests at 1/second for example?

I see it was an error to delete all my thumbnails... Sad 
Ok. I know nothing about python, but I managed to find the place to add a "time.sleep(1)" and thus control download speed... BUT, I've tested some sleep values, and all of them end with a "ban" from fanart.tv. If I cancel script execution and restart it, it works again for some downloads, so I assume I should find a way to close and open the thread every few seconds... or... uglyer but also possible, I should find a way to automate that script "cancel/restart"...
Reply
(2020-06-02, 12:10)peque Wrote:
(2020-06-02, 09:19)peque Wrote:
(2020-06-02, 05:05)Milhouse Wrote: Unfortunately not - this is another of the problems when using remote content. Sad   

This is why fanart.tv requests keeps returning 503 error every now and then:

https://twitter.com/fanartdottv/status/1...6035563520

The question is: could the script be modified somehow to respect this max speed of 3 requests a second? I assumed that 1 thread max could slow down the process... but I see it's not the case. Could it just add a config option to limit requests at 1/second for example?

I see it was an error to delete all my thumbnails... Sad 
Ok. I know nothing about python, but I managed to find the place to add a "time.sleep(1)" and thus control download speed... BUT, I've tested some sleep values, and all of them end with a "ban" from fanart.tv. If I cancel script execution and restart it, it works again for some downloads, so I assume I should find a way to close and open the thread every few seconds... or... uglyer but also possible, I should find a way to automate that script "cancel/restart"...
Which thumbnails are you trying to import? Did you try disabling fanart.tv and using an alternative. For Music you can use Universal Scraper, not sure about Video content but isn't there another option like tvdb or tmdb?
Reply
(2020-06-02, 04:43)Milhouse Wrote: Your best option would be to use mklocal.py (see link at bottom of first post) so that it removes the missing artwork and then use Artwork Beef to rescrape new artwork (and configure it to store the artwork locally, or use mklocal.py to convert any remote artwork to local artwork).
(2020-05-30, 20:59)J_E_F_F Wrote:  
Yes, it appears those tmdb links are now broken (File not found) I guess they changed something.
 
Artwork beef will not install on my LibreELEC (Milhouse): devel-20200527213954-#0527-ga7939cf (RPi2.arm), at least one of the dependencies will not install. (xbmc.python version 2.19.0 could not be satisfied)
Reply
(2020-06-02, 09:17)Raytestrak Wrote: Still, performance wise it would be cool to be able to prune only a certain source. Say you delete a tvshow, instead of pruning everything, you could just prune tvshows. Don't know if that's possible at all (and I would understand it would be too much trouble to implement, just because some random guy on the internet has an OCD Rofl)

I'm pretty sure that isn't really possible. As I previously explained the prune process has to match all cached artwork with a source, so if you exclude sources then you have a lot of unmatched artwork (which are then removed). The Texture Cache has no information about the cached artwork item other than the cached filename in the Thumbnails folder, and this filename is based on a one-way hash of the original media library filename so it's not actually possible to look at the Texture Cache files in isolation and know where the artwork has come from. Most will be from your sources, and some (that have no matching source) will be accumulated dross that is wasting space, so if you exclude a source then the artwork from that source becomes "dross wasting space". For this reason, you *have* to take into consideration all the media library sources that create cached artwork, and generate the cached filename hash for every media library artwork item in those sources so that you can match the generated hashes against the Texture Cache entries and exclude those that match so that you only remove the remainder. If you exclude a source (that has created cached artwork) then the prune process will want to remove that cached artwork.

My advice would be to schedule the prune option overnight. Smile
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
(2020-06-02, 09:19)peque Wrote:
(2020-06-02, 05:05)Milhouse Wrote:
(2020-06-01, 23:27)peque Wrote: Hi all,

I've done a clean install of Kodi, restoring all my userdata config BUT textures13.db and /Thumbnails directory, as they're not backed up to save time/space, and as they should be recreate with no problem. Smile

Now I want to recreate all my artwork by doing "texturecache.py C". The thing is that fanart.tv is just letting me download a few images, and after that I get 503 errors. If I stop script and restart it again, I can download a few more... and so.

Is there any way to "slow down" download process so fanart.tv doesn't temporarily "ban" me? I've already set up only one thread for that site, so I don't know what more I can do.

Thanks a lot.

Unfortunately not - this is another of the problems when using remote content. Sad  

This is why fanart.tv requests keeps returning 503 error every now and then:

https://twitter.com/fanartdottv/status/1...6035563520

The question is: could the script be modified somehow to respect this max speed of 3 requests a second? I assumed that 1 thread max could slow down the process... but I see it's not the case. Could it just add a config option to limit requests at 1/second for example?

I see it was an error to delete all my thumbnails... Sad

I'll have a think, but yes a 1/second limit option seems like the quickest fix. Since every artwork hosting web site is likely to impose different rate limiting rules the ideal would be for the script to be configured with those rules but that isn't likely to happen (at least, I have no intention of implementing that) as it would become a maintenance chore (as rules change etc.). Hopefully the fanart rate limit is only temporary as I imagine that's going to screw up Kodi as well.
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
(2020-06-02, 11:59)Raytestrak Wrote: When using the c parameter, does it first check for local fanarts / thumbs before looking online?

No, the path for each artwork item is in your media library - this may be the path of a local file, or it may be a remote artwork url - so there's no need for the script to search, it only has to ask Kodi to download the relevant path or url based on the location of the artwork you have scraped into your media library. Of course if the artwork is remote, and the artwork no longer exists at the configured url, then Kodi won't be able to download anything, and you will need to scrape a new url for the poster.

(2020-06-02, 11:59)Raytestrak Wrote: Also, but this probably has nothing to do with this utility: if I remove stuff from my library, I (sometimes) still see references in the path and/or art tables in the database.

That's what the P option is for - if you remove an item (movie, tvshow, album, etc.) from your media library then the texture cache on each of your Kodi clients will continue to store the old cached artwork (posters, fanart, cover art etc. etc.), which is just wasting space. The P (prune) option cross references your media library artwork with the cached artwork and removes the cached artwork that is not present (or no longer present) in your media 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.
Reply
  • 1
  • 187
  • 188
  • 189(current)
  • 190
  • 191
  • 197

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