• 1
  • 78
  • 79
  • 80(current)
  • 81
  • 82
  • 197
[RELEASE] Texture Cache Maintenance utility
Great, character-problems seem to be fixed. Runs through without an error!

BUT i think i got something else wrong regarding my --local path.

To be honest i don't really understand how to determine the correct "--local path" for my setup. Any additional hint? As mentioned i only use simple SMB shares from a windows machine, the openelec xbmc device itself has no media-content whatsoever. But i think that's not really the point, is it?
Hints welcome. Smile
⬅️⬅️ Feel free to leave a 👍 on useful posts  |  A Confluence ZEITGEIST (A modern reimagination of Confluence)  |  axbmcuser REPO (Download Link)  |  Kodi 17.7 DSPlayer x64 BETTERGUI (2020 build)
Reply
It's hard to say precisely, given my unfamiliarity with your system but given the path for the movie you sent me:
Code:
smb://windowsmachine/smb_1/allfoldershere/Blutzbr\u00fcdaz (2012)/Blutzbr\u00fcdaz Trailer (2012).mkv

then it's clear you've got a share (smb_1) that maps to some folder on on the "windowsmachine" PC.

Let's say smb_1 is mapped to "d:\movies" (below which is "allfoldershere", below which are your individual movie folders).

Now, in Kodi, you've got a movie source which is (probably) "smb://windowsmachine/smb_1"

In this situation, your local and prefix paths should be:
Code:
--local d:\movies --prefix smb://windowsmachine/smb_1

All the script is doing is translating the Kodi path (prefix) to your "local" path (and vice versa) so that the script can access (read) the details of the movie and associated artwork files.

Note that the machine on which you are running the script *MUST* have access to the media referenced by the --local path.
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
If you're running this script on OpenELEC, then you'll need to mount the SMB share on OpenELEC as an OS mount point, eg.

Code:
mkdir /storage/windows
mount -t cifs -o username=myuser,password=mysecret,sec=ntlm //windowsmachine/smb_1 /storage/windows

(change myuser/mysecret to match your credentials)

then your --local and --prefix parameters become:
Code:
--local /storage/windows --prefix smb://windowsmachine/smb_1
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
That did the trick. I just did a test with many files. Seems all good now. All poster paths are fixed and working again.
If i notice anything else, i'll let you know. Thank you again! Smile
⬅️⬅️ Feel free to leave a 👍 on useful posts  |  A Confluence ZEITGEIST (A modern reimagination of Confluence)  |  axbmcuser REPO (Download Link)  |  Kodi 17.7 DSPlayer x64 BETTERGUI (2020 build)
Reply
(2014-11-28, 18:05)axbmcuser Wrote: That did the trick. I just did a test with many files. Seems all good now. All poster paths are fixed and working again.
If i notice anything else, i'll let you know. Thank you again! Smile

Great. Smile

A few other uses for mklocal.py...

1) You can of course use the same approach to add new artwork of any type, eg. clearart, logo, discart etc.

2) If you want to convert remote artwork to local artwork, it will do that too. Just remove the --readonly parameter and mklocal.py will download the original artwork (if still available) and store it alongside your movies (this is superior to exporting from your cache, where the quality may have suffered during the caching process). The filename format for the local artwork will be *-type.jpg/png unless --singlefolders is specified when the format will be type.jpg/png (where type is poster, fanart, disc, etc.).

For instance, it's useful to run mklocal.py and download remote artwork after running Artwork Downloader as the latter doesn't support multiple movies in a single folder, so can't be used to create local artwork but is still useful for finding the remote artwork in the first place and associating it with movies.

3) Finally, any artwork that is no longer available (remotely or locally) can be automatically expunged from your media library by adding the --nokeep parameter, which can be useful when tidying up.

Running mklocal.py on a semi-regular basis should help keep your artwork in tip-top condition and your media library free of remote 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
Is there a way/command, to remove all the logos (only) ??

And btw (using openlec and SSH on windows pc), where can i edit the properties file? Because i want to correct this error:

XBMCquarto:~ # ./texturecache.py R
Found 5,355 orphaned files for 34,786 database files.

This is far too many orphaned files for this number of
database files - more than 5% - and something may be wrong.

Check your configuration, database, and Thumbnails folder.

Add "orphan.limit.check = no" to the properties file
if you wish to disable this check.



Meaning: Where do I place the texturecache.cfg ?
Reply
(2014-11-30, 18:30)djhifi Wrote: Is there a way/command, to remove all the logos (only) ??
Code:
cat movies.dat | mklocal.py --local /tmp --prefix nfs://192.168.0.3/mnt/share/media --artwork clearlogo --readonly --nokeep --output changes.dat
should produce a changes.dat that will remove all your logos when run through "texturecach.py set". Obviously change your --prefix to match your setup. Using "--local /tmp" is a quick way to prevent the script finding any matching local artwork, obviously you can use your actual OS path too provided it doesn't contain logo artwork.

(2014-11-30, 18:30)djhifi Wrote: And btw (using openlec and SSH on windows pc), where can i edit the properties file? Because i want to correct this error:
...
Meaning: Where do I place the texturecache.cfg ?

Search order for properties file (when @config= is not specified):
1. Current working directory
2. script directory
3. ~/.config/texturecache.cfg
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
I am having trouble getting my artists and album artwork to work. For a few, I have artwork, but for the vast majority, I do not. I can go and manually download for most that I tried, but with a huge library, that's just not worth it. (It's interesting that some a blank thumb/fanart listed as a remote source.)

I've tried removing/adding the source a few times with no luck. It seems that my movies and TV shows work fine so I was hoping I could use this to fix the music but leave the rest in tact. Assuming it would actually fix the problem, is it be possible to have it delete the old data for just the music portion and then download new content? If so, how would I do this? I've never run a script before, but I've been able to at least get the script running and able to reach my database.
Reply
(2014-12-06, 01:21)mlu3141 Wrote: I am having trouble getting my artists and album artwork to work. For a few, I have artwork, but for the vast majority, I do not. I can go and manually download for most that I tried, but with a huge library, that's just not worth it. (It's interesting that some a blank thumb/fanart listed as a remote source.)

If you've got missing artist/album artwork you'll need to post in the support thread for whatever scraper you're using - the author and other users may be able to advise what the problem is, although it's usually a naming problem of some kind.

(2014-12-06, 01:21)mlu3141 Wrote: I've tried removing/adding the source a few times with no luck. It seems that my movies and TV shows work fine so I was hoping I could use this to fix the music but leave the rest in tact. Assuming it would actually fix the problem, is it be possible to have it delete the old data for just the music portion and then download new content? If so, how would I do this? I've never run a script before, but I've been able to at least get the script running and able to reach my database.

The music library is a lot less well developed than the video library, consequently there are no JSON methods to set, modify or clear artwork, so methods that work for the Video database won't work for Music, unfortunately.

Consequently, the only way to "clear" your music library of artwork is to drop (delete) the entire library and re-scan from scratch. It's possible you could try direct SQL manipulation but I've got no information on how you should go about that.

If you're using SQLite, your music library will be called .kodi/userdata/Databases/MyMusic48.db in Helix (it may have a lower number in older versions, ie. 46 in Gotham). Just delete it and restart Kodi then re-add your music.

Your music database is separate from your video database so dropping the music database will have no effect on you movies and tvshows.
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. I'll try deleting the library db, and if that doesn't work, take it up with the add-on developers.
Reply
At first: great tool!

But i have a little Problem: i want to run it every day with a batch file in windows, something like "start texturecache.py watched tvshows text.txt" but this doesn´t work. Can someone help me out?
I´m not really a batch expert...

Thanks in advance....
Reply
Not really related to the tool, but perhaps you can say something about this, Milhouse. I get tons of these messages when i set up a new library:

Code:
16:40:28 T:2714760272 WARNING: COMXImageFile::GetCodingType progressive images not supported by decoder
16:40:28 T:2714760272   ERROR: COMXImageFile::ReadFile nfs://192.168.178.38/volume4/serien2/Family Guy/Season 07/Family.Guy.S07E06.DVDRip.x264.AC3.5.1-wald0-thumb.jpg GetCodingType=0x7fffffff

Any idea what this means?
Reply
(2014-12-10, 18:01)theowiesengrund Wrote: Any idea what this means?

Yes, the Pi doesn't support hardware accelerated decoding of progressive jpeg images and will fall back to software decoding whenever a progressive jpeg is encountered.

The artwork stored in the cache will *not* be progressive so you'll only see this error - it's really more of a "warning" - the first time a new artwork is encountered and needs to be cached. Hardware accelerated decoding can then be used when subsequently displaying the cached 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
It took me a while to figure out how to set this up in Windows 8.1, so thought I'd share what I did...

1. Installed Python 3.4.2 for Windows. https://www.python.org/downloads/windows/

2. Downloaded the texturecache.py script to my c: drive.

3. Created the texturecache.cfg file, also on my c: drive.

These are the lines I customized:

userdata = C:\Users\XXXX\AppData\Roaming\Kodi\userdata
webserver.username = XXXX
webserver.password = XXXX
allow.recacheall = yes

4. Added a new system variable, PYTHONPATH, set to C:\Python34 (my Python install location).

Control Panel --> System --> Advanced system settings --> Environment Variables...

Image

5. Opened a cmd window and right clicked on the title bar and chose Properties to get to the screen shown below. Adjusted the positions on the Layout tab to make the cmd window full screen.

Image

6. Finally, just ran the script by entering "python c:\texturecache.py" at the command prompt, followed by the various options.
Reply
Thanks bryanbrazil. You might even be able to omit the "python" prefix in step 6 once you've added Python top your PATH.
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
  • 78
  • 79
  • 80(current)
  • 81
  • 82
  • 197

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