•   
  • 1
  • 56
  • 57
  • 58(current)
  • 59
  • 60
  • 179
  •   
[RELEASE] Texture Cache Maintenance utility
The thing is that texturecache.py will, by default, try to auto-update itself, so if you put it somewhere that is writeable only by root (such as /usr/local/bin) it will need to be run as root in order to update itself (not generally considered a good idea) or you must change the ownership of texturecache.py to pi:pi after copying it to /usr/local/bin as root.

I guess the advantage of putting it in /usr/local/bin is that it should be on the default path (depending on distro, of course), and should therefore be executable from "anywhere", but given the nature of the script it's hard to see this as being of much benefit.

For a Raspberry Pi user, creating texturecache.py in /home/pi (or /storage if using OpenELEC) is by far the simplest option - that way the script is persistent, owned by the user that runs it (and therefore writeable), and requires no special privileges during installation or execution.
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
what about /home/$USER/bin ?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
(2014-03-18, 08:12)nickr Wrote: what about /home/$USER/bin ?

Sure, why not - should keep things a bit neater and tidier. So many ways to skin this cat. 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
whats wrong here?

Code:
Cache pre-load activity summary for "movies":


              |    banner   |   clearart  |  clearlogo  |   discart   |    fanart   |  landscape  |    poster   |    thumb    |    TOTAL    
--------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------
Cached        |      -      |      -      |      -      |      -      |      -      |      -      |      -      |      -      |      0      
Deleted       |      -      |      -      |      -      |      -      |      -      |      -      |      -      |      -      |      0      
Duplicate     |      -      |      -      |      -      |      -      |      3      |      -      |      3      |      -      |      6      
Error         |      -      |      -      |      -      |      -      |      -      |      -      |      -      |      -      |      0      
Ignored       |      -      |      -      |      -      |      -      |      -      |      -      |      -      |      -      |      0      
Skipped       |      37     |      40     |      57     |      47     |     880     |      37     |     889     |      4      |     1991    
Undefined     |      -      |      -      |      -      |      -      |      -      |      -      |      -      |      -      |      0      
============================================================================================================================================
TOTAL         |      37     |      40     |      57     |      47     |     883     |      37     |     892     |      4      |     1997    

       Loading: 00:00:00.23
       Parsing: 00:00:00.06
     Comparing: 00:00:00.20
TOTAL RUNTIME: 00:00:00.50

heres my workflow:
  • i use mediaelch to scrape movies
  • i use mediaelch to sync stuff to xbmc
  • texturecache to prune missing cached items ( flag P)
  • texturecache to repopulate cache items ( flag c)

result is (as expected) no artwork (cd art ect) in xbmc aeon mq5

any hint? do you need a debug log of anything?
cu
Reply
It's saying everything is already cached, what were you expecting?

Apparently you have 47 discart cached, which I imagine is your "cd art", are you sure it's not a skin issue? What artwork type is the skin trying to use?

Check a single movie with "jd movies <moviename>" and ensure the artwork "types" in your media library (poster, fanart, clearart, clearlogo, etc.) are the same ones the skin is trying to use - it's not going to work if the skin is using "cdart" but your library has been loaded with "discart".
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
oh! i was expecting big numbers in the "cached" row...my fault Wink

and now some debugging:

step 1: output of "texturecache.py jd movies wanted" - (skin artwork is broken/missing in xbmc ui)

Code:
{
    "art": {
      "fanart": "image:///media/disk2/movie2/sd2/wanted/Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-fanart.jpg/",
      "poster": "image:///media/disk2/movie2/sd2/wanted/Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-poster.jpg/"
    },
    "file": "/media/disk2/movie2/sd2/wanted/Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008.mkv",
    "label": "Wanted",
    "movieid": 1813,
    "title": "Wanted"
  }

a lot of entries missing here...so i run addon "artwork downloader" manually. the xbmc ui is fine afterwards...i can see "cd art", "logo", "clearart" ect

step 2: output of "texturecache.py jd movies wanted" - (skin/xbmc artwork fine in the xbmc ui)

Code:
{
    "art": {
      "banner": "image:///media/disk2/movie2/sd2/wanted/banner.jpg/",
      "clearart": "image:///media/disk2/movie2/sd2/wanted/clearart.png/",
      "clearlogo": "image:///media/disk2/movie2/sd2/wanted/logo.png/",
      "discart": "image:///media/disk2/movie2/sd2/wanted/disc.png/",
      "fanart": "image:///media/disk2/movie2/sd2/wanted/fanart.jpg/",
      "landscape": "image:///media/disk2/movie2/sd2/wanted/landscape.jpg/",
      "poster": "image:///media/disk2/movie2/sd2/wanted/Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-poster.jpg/"
    },
    "file": "/media/disk2/movie2/sd2/wanted/Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008.mkv",
    "label": "Wanted",
    "movieid": 1813,
    "title": "Wanted"
  }


step 3: changed artwork for movie wanted in mediaelch and try another xbmc sync via mediaelch ui

step 4: output of "texturecache.py jd movies wanted" after mediaelch sync

Code:
{
    "art": {
      "fanart": "image:///media/disk2/movie2/sd2/wanted/Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-fanart.jpg/",
      "poster": "image:///media/disk2/movie2/sd2/wanted/Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-poster.jpg/"
    },
    "file": "/media/disk2/movie2/sd2/wanted/Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008.mkv",
    "label": "Wanted",
    "movieid": 1978,
    "title": "Wanted"
  }

result: it looks like the sync feature in mediaelch is some kinda broken or not correctly implemented.

that takes me to my next question:

heres a listing of my files in filesystem:

Code:
banner.jpg     poster.jpg
clearart.png   Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-banner.jpg
disc.png       Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-clearart.png
extrafanart    Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-fanart.jpg
extrathumbs    Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-landscape.jpg
fanart.jpg     Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008.mkv
landscape.jpg  Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008.nfo
logo.png       Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-poster.jpg

how can i manually repopulate the xbmc db with these (already present in fs) artwork? is it possible in/with the help of "texturecache maintenance utility"?

and last but not least a complete offtopic question:

whats the prefered naming scheme for artwort in frodo/gotham?

<moviename>-banner.jpg or is it banner.jpg ... or does it depend on the used skin?

thx in advance!
cu
Reply
(2014-03-21, 03:16)tesona1977 Wrote: result: it looks like the sync feature in mediaelch is some kinda broken or not correctly implemented.

Yep, MediaElch is wiping out what you have loaded outside of Mediaelch and repopulating only what it thinks you have. Not sure how it achieves it's "sync" - probably remove & rescan?

(2014-03-21, 03:16)tesona1977 Wrote: heres a listing of my files in filesystem:

Code:
banner.jpg     poster.jpg
clearart.png   Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-banner.jpg
disc.png       Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-clearart.png
extrafanart    Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-fanart.jpg
extrathumbs    Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-landscape.jpg
fanart.jpg     Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008.mkv
landscape.jpg  Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008.nfo
logo.png       Wanted (James McAvoy, Morgan Freeman, Angelina Jolie - Timur Bekmambetov) 2008-poster.jpg

how can i manually repopulate the xbmc db with these (already present in fs) artwork? is it possible in/with the help of "texturecache maintenance utility"?

You've got a mixture of artwork, some with movie-name prefix and some without. The latter probably courtesy of Artwork Downloader which doesn't support movie-name prefixes.

Your options are to continue using Artwork Downloader and naming your artwork without a movie name prefix (which means storing single movies per folder). Or you can use the mklocal.py tool which will load your movie-name prefix artwork - read previous posts (previous half-dozen pages or so) for information on usage.

(2014-03-21, 03:16)tesona1977 Wrote: and last but not least a complete offtopic question:

whats the prefered naming scheme for artwort in frodo/gotham?

<moviename>-banner.jpg or is it banner.jpg ... or does it depend on the used skin?

thx in advance!

It depends whether you have single movies per folder. If so then banner.jpg is the usual solution.
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.

Short time user, first time poster.

Been working with this tool for a bit. Pretty straight forward and seems to do a lot more than I need it to. I like it a lot.

That being said, I'm having a bit of trouble interpreting the output and wondering if someone had a moment to answer a few questions or point me in the direction of a resource that might have the answers for me to research myself. In particular, I'm looking to understand the following:

Cached | 603
Deleted | 0
Duplicate | 3198
Error | 1
Ignored | 10
Season-all | 0
Skipped | 2461
Undefined | 77

1) What is the significant of 'duplicate'? Are these image files that are duplicated in the database and need to be purged?
2) Why would something be ignored?
3) Why would things be skipped?
4) What is undefined in this context?
5) Is there a way to output a log file telling me what was duplicated, ignored, skipped or undefined?

Thanks for your time.
Reply
(2014-03-23, 15:32)SiliRat Wrote: or point me in the direction of a resource that might have the answers for me to research myself.

Maybe the source code? Smile

(2014-03-23, 15:32)SiliRat Wrote:
Code:
Cached        |  603
Deleted       |  0
Duplicate     |  3198
Error         |  1
Ignored       |  10
Season-all    |  0
Skipped       |  2461
Undefined     |  77
1) What is the significant of 'duplicate'? Are these image files that are duplicated in the database and need to be purged?
2) Why would something be ignored?
3) Why would things be skipped?
4) What is undefined in this context?
5) Is there a way to output a log file telling me what was duplicated, ignored, skipped or undefined?

Thanks for your time.

1) Have a look at a tvshow with "jd tvshows <tvshowname>". Notice how the tvshow poster artwork is repeated against each season entry, and then again against each episode within a season. Example: 1 tvshow, with 4 seasons, each with 10 episodes - that would be 1 + 4 + 40 instances of the same tvshow poster in your media libary. Obviously, 44 of those instances are "duplicates", as the texture cache only needs to cache the tvshow poster once. It's not an error, it's just the way the artwork data is somewhat redundantly represented within the media library.

2) There are two reasons (both of which would be recorded in the logfile if you had logfile enabled). Either you have specified a restricted number of artwork types to be cached (using the cache.artwork property) or you have artwork which is matching against one of the patterns in the cache.ignore.types property - this latter list usually contains "^video, ^music" in order to avoid caching "embedded" artwork.

3) When selectively caching, items will be "skipped" if they are already present in the cache. When forcing a cache update along with a value for the cache.refresh property, items will be skipped if they are present in the cache but have not been modified within the specified cache.refresh period.

4) It means you have an artwork entry in the media library for which there is no value, eg:
Code:
[
  {
    "art": {
      "clearart": "image://nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland (2009)[BDRip]-clearart.png/",
      "clearlogo": "image://nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland (2009)[BDRip]-logo.png/",
      "fanart": "",
      "poster": "image://nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland (2009)[BDRip]-poster.jpg/"
    },
    "file": "nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland (2009)[BDRip].mkv",
    "label": "Zombieland",
    "movieid": 744,
    "title": "Zombieland"
  }
]

In the above example, fanart would be classified as "undefined".

5) Add @logfile=/path/to/your/logfile.log to your command line, or add it to your properties file (without the @). The log may not contain the categorisation of absolutely every item (for instance, undefined and duplicates are not logged as it's not typically useful, and also potentially excessive, particularly when dealing with music database) but it should give you some idea for most. Dumping your movies or tvshows to a file and searching/grepping is another way to find missing data, or run a qa check, it should flag up missing art (specify the art you require using the qa.art.* property fields, eg. default for tvshows is:
Code:
qa.art.tvshows.tvshow = fanart, banner, poster
qa.art.tvshows.season = poster
qa.art.tvshows.episode = thumb
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 - I have been trying to get this script to reload my thumb cache, and I think I've been able to narrow it down to an issue with NFS.

I have Gotham Beta 2, and my library is located on my NAS, XBMC is on a Win7 box.

I dont have the whole log in front of me since I'm at work, but after scanning images it attempts to cache, and I see mostly errors that say:

"ERROR: WebServer: Failed to open image:"
"ERROR: XFILE::CDirectory::GetDirectory - Error getting"
"Failed to open image://nfs%3a%2f%2f"

I've been searching everywhere to figure out whats going on, but so far no luck.
Videos play just fine, but since i wiped my thumbnails and texture13.db, ive not been able to get any thumbs to load.

thanks for any help!
Reply
(2014-03-27, 14:31)mingiunate Wrote: Hi - I have been trying to get this script to reload my thumb cache, and I think I've been able to narrow it down to an issue with NFS.

I have Gotham Beta 2, and my library is located on my NAS, XBMC is on a Win7 box.

I dont have the whole log in front of me since I'm at work, but after scanning images it attempts to cache, and I see mostly errors that say:

"ERROR: WebServer: Failed to open image:"
"ERROR: XFILE::CDirectory::GetDirectory - Error getting"
"Failed to open image://nfs%3a%2f%2f"

I've been searching everywhere to figure out whats going on, but so far no luck.
Videos play just fine, but since i wiped my thumbnails and texture13.db, ive not been able to get any thumbs to load.

thanks for any help!

You might want to read this thread and this thread - it looks like NFS is buggered in Beta 2 on Windows.
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 get this error.

[email protected]:~/texturecache.py$ python texturecache.py c
Traceback (most recent call last):
File "texturecache.py", line 7150, in <module>
main(sys.argv[1:])
File "texturecache.py", line 6892, in main
if not checkConfig(argv[0]): sys.exit(2)
File "texturecache.py", line 6552, in checkConfig
data = jcomms.sendJSON(REQUEST, "libPing", checkResult=False, useWebServer=True)
File "texturecache.py", line 1647, in sendJSON
return json.loads(data) if data != "" else ""
File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Any ideas on what I'm missing

thanks
joe
Reply
(2014-03-28, 18:21)unclejoe01 Wrote: Any ideas on what I'm missing

thanks
joe

Not really - check your webserver is enabled and correctly configured in System -> Settings -> Services. The default port used by the script is port 8080, maybe you've got something else listening on port 8080. If your XBMC webserver is listening on port 80 (and you can't easily change it to port 8080) add "webserver.port = 80" to your texturecache.cfg file.
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
running in ubuntu I get this error: ERROR: Socket closed prematurely - exiting
any ideas?
edit: running gotham beta 3
Reply
Ya, get a condom for that premature stuff, for all else, get a Debug log (wiki)
Reply
  •   
  • 1
  • 56
  • 57
  • 58(current)
  • 59
  • 60
  • 179
  •   
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average



Logout Mark Read Team Forum Stats Members Help
[RELEASE] Texture Cache Maintenance utility4.7617