[RELEASE] Texture Cache Maintenance utility

  Thread Rating:
  • 16 Vote(s) - 4.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
steve1977 Offline
Posting Freak
Posts: 2,611
Joined: Dec 2006
Reputation: 0
Post: #2266
I ran it and it seemed to work. It cached more than 14k items (mainly thumbs) and only showed 49 errors (also mainly thumbs).

However, my issue is not addressed yet. I am using Kodi as UPNP server for music. Unfortunately, Kodi only serves the albumart of albums that I have actually viewed in the Kodi interface. No idea what information is generated when the album is viewed, but this must be different than what the texture maintenance utility does. After running, still not all albumart is available over UPNP.

Very easy to replicate by trying to access Kodi music library via UPNP on VLC (IOS).

Any idea how this could be solved?

Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
find quote
Milhouse Offline
Team-Kodi Member
Posts: 12,665
Joined: Jan 2011
Reputation: 624
Post: #2267
Can you run "texturecache.py jd albums <albumname>" on the client you are using to access your UPNP content (where <albumname> is the name of an album you access using UPNP) and paste the results.

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.
find quote
steve1977 Offline
Posting Freak
Posts: 2,611
Joined: Dec 2006
Reputation: 0
Post: #2268
Thanks for your quick reply. Unfortunately, my UPNP client is on an iphone. I tried two different clients (VLC for IOS and Glider) and result is consistent. When then hovering on the album in Kodi (in WIn 10) and re-opening the same album on my VLC client, the albuart shows up. The issue is replicable for me.

Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
find quote
Milhouse Offline
Team-Kodi Member
Posts: 12,665
Joined: Jan 2011
Reputation: 624
Post: #2269
Ah OK. So you've cached all the album artwork on the "server". Make sure it's not embedded artwork using mp3 tags (artwork urls will start with "music://") as it's not possible to preload the cache with embedded artwork as they require a GUI process to extract the artwork from the music files (ie. you must view embedded artwork in the GUI in order to cache them). Assuming its not embedded and all artwork is now present in the texture cache on the server, then if artwork isn't being displayed on the client this is a UPNP issue you should talk to @montellese about (I see you've already found his UPNP thread).

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.
find quote
steve1977 Offline
Posting Freak
Posts: 2,611
Joined: Dec 2006
Reputation: 0
Post: #2270
Thanks. Got the issue then. It is indeed embedded artwork in MP3 tags. Would it solve my issue to extract the coverart? There are tools doing so, right?

Yup, I also posted in the UPNP thread, but on a separate topic. Would also be great to hear if you have a thought on this.

Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
find quote
Milhouse Offline
Team-Kodi Member
Posts: 12,665
Joined: Jan 2011
Reputation: 624
Post: #2271
(2017-07-09 16:02)steve1977 Wrote:  Thanks. Got the issue then. It is indeed embedded artwork in MP3 tags. Would it solve my issue to extract the coverart? There are tools doing so, right?

If you were to place the extracted cover art alongside the music files (ie. in the album folder, assuming this is how you have your albums organised) with the cover artwork called "cover.jpg" then that would work, and the cache could be pre-loaded with your cover art, although you'd need to re-scrape your music in order for Kodi to use the local cover.jpg. Not entirely sure whether Kodi "prefers" local artwork to embedded artwork - you may want to test this with one album first.

I'm not aware of any tools to automate extraction of embedded 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.
find quote
steve1977 Offline
Posting Freak
Posts: 2,611
Joined: Dec 2006
Reputation: 0
Post: #2272
Thanks. Was just trying to use the purge feature to delete all cache and start from scratch (using c for rebuild). Somehow, I cannot get the purge feature to work though. I tried both "texturecache.py purge" and "texturecache.py purge all", but both did not work. Any thoughts?

Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
find quote
Milhouse Offline
Team-Kodi Member
Posts: 12,665
Joined: Jan 2011
Reputation: 624
Post: #2273
If you want to delete the entire texture cache the quickest way is to delete Textures13.db and the Thumbnails folder.

The "purge" command is intended for the mass deletion of artwork that matches the specific criteria, ie. "texturecache.py purge all https://i.ytimg.com" would remove all the images cached by the YouTube addon as the artwork urls for this addon all start with "https://i.ytimg.com".

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.
(This post was last modified: 2017-07-10 20:20 by Milhouse.)
find quote
Karellen Offline
Super Moderator
Posts: 2,244
Joined: Apr 2017
Reputation: 33
Location: Melbourne, Australia
Post: #2274
Guide to deleting Textures13.db here... Artwork#Recovering_Disk_Space (wiki)

My Signature
Links to : Forum Rules | Banned Add-Ons | Debug Log | Free Movies/TV Shows |


find quote
steve1977 Offline
Posting Freak
Posts: 2,611
Joined: Dec 2006
Reputation: 0
Post: #2275
Thanks, all working now.

Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
find quote
J_E_F_F Offline
Senior Member
Posts: 211
Joined: Sep 2013
Reputation: 2
Post: #2276
I had an issue today with a band concert DVD that I created a MKV file out of. I did it when the DVD was first released so there may not have been an entry in the movie scraper at the time, and I have scanned the library probably 20 times since then and the file has never shown up in my library.
Today I manually navigated to the file, Settings > media > library > videos > video > [selected file] > information > refresh
Then all the information and artwork were downloaded, and it was finally added to my video library. It was pretty involved and I would think a vscan should have caught it in the last few months, but it never did. I add things and run vscan all the time.

Is there a texturecache command that will look for files not currently in the DB/library or specifically excluded and try to update and add them?
find quote
Milhouse Offline
Team-Kodi Member
Posts: 12,665
Joined: Jan 2011
Reputation: 624
Post: #2277
Try "texturecache.py missing movies <source-name>", this will list those files in your source that are not in the library.

There's no way way to force Kodi to detect a file that the video library scan is not detecting. This is often due to the "fast hash" algorithm not detecting that the new file has been added and is a particular issue when the exFAT filesystem is used. There's a "usefasthash" advanced setting to work around this issue: AdvancedSettings.xml#videolibrary (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.
find quote
J_E_F_F Offline
Senior Member
Posts: 211
Joined: Sep 2013
Reputation: 2
Post: #2278
I got a list of a few files, thank you, this is also from a remote NTFS filesystem, not exfat.

I tried the same for audio/music, but am getting an error, what would the proper command be?
i.e. # texturecache.py missing music Music <Music> is my source name

ERROR: music is not a valid media class
ERROR: audio is not a valid media class
find quote
Milhouse Offline
Team-Kodi Member
Posts: 12,665
Joined: Jan 2011
Reputation: 624
Post: #2279
@J_E_F_F: texturecache.py missing songs Music

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.
find quote
J_E_F_F Offline
Senior Member
Posts: 211
Joined: Sep 2013
Reputation: 2
Post: #2280
thanks, never would have thought of songs lol
find quote
Post Reply