• 1
  • 77
  • 78
  • 79(current)
  • 80
  • 81
  • 197
[RELEASE] Texture Cache Maintenance utility
You've misunderstood the purpose of the "missing" option.

The "missing" option uses JSON to "walk" your file system (ie. one or more sources) to find movies or tv episodes that are *not* present in your media library (ie. finding files that are "missing" from your media library). Kodi needs access to the file system in order for this option to work - the media library is read first, then the file system is walked or "traversed" and with your movieshare2 source being dead Kodi is most likely returning an error of some kind when trying to access the file system as it no longer exists.

The "missing" option does not tell you which media items are no longer accessible in your file system, and is not the option you require.

In fact, there isn't really an option for what you require, although you could try:
Code:
./texturecache.py query movies 'file startswith nfs://192.168.178.29/volume2/movieshare2'

which should list all the movies you had on that 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
Thank You! Exactly what i needed!
Reply
Maybe I just don't understand what I'm doing..
If I have like 30 corrupt images... For instance, no matter what I delete or reload or wipe, when the movies scrape, they are empty;
Wouldn't it just be easiest to delete the images folder & textures file? I looked through the tutorial, and it seems I'd have to type coding for each movie. I'm not completely tech savvy, but I can ...figure...stuff...out...

Even if I delete the folders, it seems like the system freaks out for a bit before it fully recovers all images properly. It's not instant. I always have to reset several times.

Or, does this just run and auto grab all my errors? I've looked at this for a while, and still don't quite grasp it.

Any tips?
Reply
It (the script) can't recognise corruption (assuming you're referring to visual artefacts in your cached images) although such corruption would suggest some sort of system instability.

Your option is to either a) delete individual artwork (using s/d) and then re-cache ( c ) - time consuming for 30 images, b) force re-cache individual movies (C movies <movie-name>) - again potentially time consuming or c) cut your losses and nuke the cache then re-cache ( c ) which may still take a while but at least you can do something else while it runs.

However it sounds like you've got a fundamental problem with your system that is causing all this corruption in the first place, and fixing that should be your priority.
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 all,

can I use the texturecache.py utility to generate all thumbnails of my (home) videos and photos that are stored on my NAS and linked to xbmc via smb protocol?

If I use "./texturecache.py nc video", the script returns


Cache pre-load activity summary for "movies/sets/tvshows":

| fanart | poster | thumb | TOTAL
--------------+-------------+-------------+-------------+-------------
Cached | - | - | - | 0
Deleted | - | - | - | 0
Duplicate | - | - | - | 0
Error | - | - | - | 0
Ignored | - | - | - | 0
Season-all | - | - | - | 0
Skipped | - | - | - | 0
Undefined | - | - | - | 0
======================================================================
TOTAL | - | - | - | 0

Loading: 00:00:00.70
Parsing: 00:00:00.00
TOTAL RUNTIME: 00:00:00.74


I'm using openelec 4.2.1 on a Raspberry Pi.

Thanks for any hint
Reply
(2014-11-23, 11:23)atv2xbmcuser Wrote: can I use the texturecache.py utility to generate all thumbnails of my (home) videos and photos that are stored on my NAS and linked to xbmc via smb protocol?

You can only pre-load the cache with artwork for videos that are present in your media library (ie. movies, tvshows, movie sets). Photos can't be pre-cached as they don't exist in the media library. I don't know anything about home videos, I'm assuming these aren't in your library and that you're just accessing them as Files, so it's unlikely there's anything this script can do for 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 Milhouse

Still been using your texturecache script to put my TV to sleep, but with some commits included and then removed again (miappa's Helix builds), I've got a weird situation, where some times, either the Pi won't put the TV to sleep, or other times when the PI wakes the Tv from standby, the pi freezes.
Weirdiest, is the USB IR receivers red LED locks on lit.

Could you have a squiz through my texturecache debug output, see if anything stands out as wrong?
http://pastebin.com/yQ6y94eb

What I find is after a reboot, Pi will suspend the TV once, and wake it once with no issues. It's the second wake of the Tv that things trip up.

Understand if your busy, just let it slide. Cheers.
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply
It looks like the mytv.sh (bin.ceccontrol) script doesn't finish when called for the 5th time (off, on, off, on, off <-- doesn't finish), so I'm guessing the log corresponds to one of those times when it didn't put the TV to sleep.

Presumably the mytv.sh script is interacting with cec-client, and it's this that is hanging, so the TV isn't turned off (or back on) and the mytv.sh script never completes.

Unfortunately cec-client is known to cause problems and there really needs to be better CEC/JSON support in Kodi to avoid breaking the Kodi CEC comms.

Someone wrote an addon that implements a couple of basic CEC methods with JSON support (TV on/off, I think), are you using this addon as it may be more reliable than calling cec-client.

Edit: See here for addon.
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
No, not using that addon, but will look into it.

the mytv.sh script contains
Code:
#!/bin/bash

case "$1" in
  "off")      echo "standby 0" | /opt/xbmc-bcm/xbmc-bin/bin/cec-client -s >/dev/null;;
  "on")       echo "on 0" | /opt/xbmc-bcm/xbmc-bin/bin/cec-client -s >/dev/null;;
esac

echo "$(date) called with $1 param" >> /tmp/tvservice.log

I'll look at the addon, see what can be done.

Thanks
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply
Thanks for this great utility!


Maybe someone can give me a hint regarding my following problem.

Having one folder for each video, i recently changed my poster-filenames
from:
Video1Name/poster.jpg
to:
Video1Name/Video1Name-poster.jpg


Now in the library all art.poster entries are still [...]/poster.jpg insted of what they should be now [...]/[...]-poster.jpg.


What can i do so my library gets the new poster filenames?

I tried cleaning and rescanning, but that did not do the trick.

If i rename one of the video-folders from "Video1Name" to "Video1NameTest" for example, everything is fine for this folder. But thats not a solution. :-)

Thanks in advance!
⬅️⬅️ 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
Cleaning/Rescanning won't work, you'll need to drop your entire database and re-scrape for it to pick up your changes. That's why Video1NameTest works.

You can however use mklocal.py to update your library with the updated artwork filenames - it will run through your media library and correct any local artwork filenames.

Try something like:
Code:
texturecache.py jd movies >movies.dat
cat movies.dat | mklocal.py --local /freenas/media --prefix nfs://192.168.0.3/mnt/share/media --artwork poster fanart clearlogo clearart --readonly > changes.dat

Change the --local and --prefix arguments to suit your setup - --local is the OS path for your media, --prefix is how this media is accessed by Kodi.

Specify whatever artwork types you want to process using the --artwork argument.

The --readonly argument means that no remote artwork will be downloaded and stored locally, only your existing local artwork will be processed.

Once you have run the above, look at the contents of the changes.dat file to see if the proposed changes make sense - it should be replacing your */poster.jpg filenames with */*-poster.jpg.

To apply the changes to your media library, run the following command (in Gotham this can be very slow, but a lot quicker in Helix):

Code:
cat changes.dat | texturecache.py set

You may then want to re-cache the new artwork once the new filenames have been applied (texturecache.py c movies).
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
Thank you very much! I will give it a try. After some sleep. Smile Good night.
⬅️⬅️ 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
Addition question:
Can mklocal.py handle characters like ü ö ä?

I get
Code:
"UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 54: ordinal not in range(128)"
when the script hits a line with such a character.
⬅️⬅️ 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
Blast. Can you upload/PM your movies.dat file. Also, if you add --verbose to the mklocal.py command line it would be useful to have a copy of the console output.
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 for the PM. I've just pushed an update to mklocal.py, you'll need to download it again (v0.2.4 - it's mentioned near the top of the source code).

From the information you sent me, I don't see the script finding your *-poster.jpg artwork, but as it was only a snippet maybe the movie details you sent me didn't have the new *-poster.jpg artwork.

Anyway, what follows is a description of what you should be seeing, using a variation of the data you sent me...

Assuming you've got a movie in your library with the following artwork:
Code:
$ cat movies.dat
[
  {
    "art": {
      "poster": "image://nfs://192.168.0.3/mnt/share/media/Test/Blutzbr\u00fcdaz (2012)/poster.jpg/",
      "fanart": "image://nfs://192.168.0.3/mnt/share/media/Test/Blutzbr\u00fcdaz (2012)/fanart.jpg/"
    },
    "file": "nfs://192.168.0.3/mnt/share/media/Test/Blutzbr\u00fcdaz (2012)/Blutzbr\u00fcdaz Trailer (2012).mkv",
    "label": "Blutzbr\u00fcdaz",
    "movieid": 225,
    "title": "Blutzbr\u00fcdaz"
  }
]

And you've got the following new *-poster.jpg/*-fanart.jpg artwork for this movie:
Code:
$ ls -la "/freenas/media/Test/Blutzbrüdaz (2012)"
total 561
drwxrwxr-x 2 neil neil      5 Nov 28 14:26 .
drwxrwxr-x 4 neil neil      4 Nov 28 14:23 ..
-rw-rw-r-- 1 neil neil 163323 Nov 13 19:51 Blutzbrüdaz Trailer (2012)-fanart.jpg
-rw-rw-r-- 1 neil neil      0 Nov 28 14:23 Blutzbrüdaz Trailer (2012).mkv
-rw-rw-r-- 1 neil neil 146400 Nov 13 19:51 Blutzbrüdaz Trailer (2012)-poster.jpg

Then you should be seeing something very similar to what follows when running mklocal.py:
Code:
$ cat movies.dat | tools/mklocal.py --local /freenas/media --prefix nfs://192.168.0.3/mnt/share/media --artwork poster fanart --readonly --verbose --output changes.dat
Current configuration:

  Local Path    : /freenas/media/
  Alt Local     : Not specified
  XBMC Path     : nfs://192.168.0.3/mnt/share/media/
  Read Only     : Yes
  Dry Run       : No
  Single Folder : No

  Artwork       : poster       as poster.[png,jpg]
                  fanart       as fanart.[png,jpg]

  Checking      : Not Specified

##DEBUG## mediatype [movie]; mediatitle [Blutzbrüdaz]
##DEBUG##   mediafile is [nfs://192.168.0.3/mnt/share/media/Test/Blutzbrüdaz (2012)/Blutzbrüdaz Trailer (2012).mkv]
##DEBUG##   local root name would be [/freenas/media/Test/Blutzbrüdaz (2012)/Blutzbrüdaz Trailer (2012)]
##DEBUG##   artwork type [poster] known by XBMC as [nfs://192.168.0.3/mnt/share/media/Test/Blutzbrüdaz (2012)/poster.jpg]
##DEBUG##     [poster    ] Found pre-existing local file:           /freenas/media/Test/Blutzbrüdaz (2012)/Blutzbrüdaz Trailer (2012)-poster.jpg
##DEBUG##     [poster    ] Converting local filename to XBMC path:  nfs://192.168.0.3/mnt/share/media/Test/Blutzbrüdaz (2012)/Blutzbrüdaz Trailer (2012)-poster.jpg
##DEBUG##     [poster    ] Changing library value to:               nfs://192.168.0.3/mnt/share/media/Test/Blutzbrüdaz (2012)/Blutzbrüdaz Trailer (2012)-poster.jpg
##DEBUG##   artwork type [fanart] known by XBMC as [nfs://192.168.0.3/mnt/share/media/Test/Blutzbrüdaz (2012)/fanart.jpg]
##DEBUG##     [fanart    ] Found pre-existing local file:           /freenas/media/Test/Blutzbrüdaz (2012)/Blutzbrüdaz Trailer (2012)-fanart.jpg
##DEBUG##     [fanart    ] Converting local filename to XBMC path:  nfs://192.168.0.3/mnt/share/media/Test/Blutzbrüdaz (2012)/Blutzbrüdaz Trailer (2012)-fanart.jpg
##DEBUG##     [fanart    ] Changing library value to:               nfs://192.168.0.3/mnt/share/media/Test/Blutzbrüdaz (2012)/Blutzbrüdaz Trailer (2012)-fanart.jpg

If you're not seeing the script detect your new fanart ("Changing library value to:" etc.) then there's a problem (paste me the debug and the contents of the movie folder).

Note that I neglected to mention you will need the "--output changes.dat" argument passed to mklocal.py to create the changes.dat file. In changes.dat, you should now have...
Code:
[
  {
    "items": {
      "art.poster": "nfs://192.168.0.3/mnt/share/media/Test/Blutzbr\u00fcdaz (2012)/Blutzbr\u00fcdaz Trailer (2012)-poster.jpg",
      "art.fanart": "nfs://192.168.0.3/mnt/share/media/Test/Blutzbr\u00fcdaz (2012)/Blutzbr\u00fcdaz Trailer (2012)-fanart.jpg"
    },
    "libraryid": 225,
    "type": "movie",
    "title": "Blutzbr\u00fcdaz"
  }
]

which when fed into "texturecache.py set" will update the movie with the new artwork filenames.
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
  • 77
  • 78
  • 79(current)
  • 80
  • 81
  • 197

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