•   
  • 1
  • 61
  • 62
  • 63(current)
  • 64
  • 65
  • 179
  •   
[RELEASE] Texture Cache Maintenance utility
(2014-05-08, 14:48)scott967 Wrote: any ideas?

Not really, you need to tell me more. How are you running it - what command? How did you install the script, is the file somehow corrupt or has it been modified?

(2014-05-08, 14:48)scott967 Wrote:
Code:
File "E:\Python27\texturecache.py". line 1418
  data.append({u"textureid": r[0], u"cachedurl": r[1],
                          ^
SyntaxError: invalid syntax

The code path you are having a problem with I have tested on Windows 7x64 with Python 2.7.3 and Python 3.3.1, and there is no syntax error. You could try removing the unicode type prefix (u) before each key, that's superfluous and could in theory be causing a problem if your Python interpreter doesn't support unicode but that doesn't seem likely with Python 2.7.6 and I also don't see why it should be a problem only 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
Having a new issue when I upgraded to Gotham. The scraper xbmc works fine, but the non scraper gets through like 5% and then starts erroring out and slowing down for the rest of them? Checked the xbmc logs and nothing really sticks out. How can I tell what exactly is the error? I closed it out after they all start to error out. Does the same thing with movies as well.
Reply
Enable logging on texturecache.py with "@logfile=/your/logfile" and enable debug logging in xbmc.log - hopefully there should be enough information to work out what the problem is, if not send me a link to both logs (also include your texturecache.cfg if you have one).
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
Got logging to work. It's strange. It goes for about 120 movies just fine ( a little slower than the scraping xbmc but works ) then speed goes to almost zero and starts popping errors. When I look at the log everything looks fine and doesn't show any errored out movies. What is weird is when I try and immediately re-run the script to catch another 100 movies or so, it errors out and says that it can't get access to the log file to write to it. It's like my OS is going to read only about 10 minutes into running the script? I may just try and reflash the whole xbmc again. It's had a few other quirks that the scraper xbmc hasn't had either. I still haven't found a good way to image the sd card from a preconfigured xbmc on a MAC. Disk Utiliy has worked like 1 out of 10 times and it's more efficient to just start from scratch and setup everything manually.

I'll try again tonight and see if I can glean any more information, but like I said it seems like the whole OS is reverting to read only. Is there possibly a specific folder I should be running the .py from that is out of the sandbox?

Thanks as always!
Reply
Does running the c command download all missing artwork (discart etc)
Reply
@rbusenet: sounds like you might have a problematic SD card - try a different SD card, switch to USB/NFS for storage or reformat the SD card.

@creesy: Should do, as long as the artwork is referenced by your media library. The "c" option will preload the cache with the remote artwork, if you really want to download the remote artwork so that it becomes "local" alongside your movies then use mklocal.py (and then preload the cache using your now 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
MilhouseVH anychance you could explain to me how to use mklocal.py?

Not very good with this took me long enough to learn how to use texture cache Tongue
Reply
(2014-05-13, 15:40)creesy Wrote: MilhouseVH anychance you could explain to me how to use mklocal.py?

Not very good with this took me long enough to learn how to use texture cache Tongue

Try reading this post which covers the basics.

Work with just one movie (or tv show) to begin with, specify a --local directory that isn't your real movie library path, check the output, and once you're happy with it then use your actual movie library path and download the remote artwork for your movies. The output generated by mklocal.py can be fed into "texturecache.py set" which will then apply the changes to your media library, after which you can run "texturecache,py c" to pre-load the cache with your new local artwork.

If you don't want to download anything but just want to associate your movies/tvshows with already existing local artwork then include the --readonly argument.

Add the --nokeep argument if you want to remove artwork from your media library that is no longer available remotely or locally.

Add the -singlefolders argument if your movies are in single folders - this will mean newly downloaded artwork is named "logo.png" instead of "<movie-name>-logo.png" etc.

Add the --season or --episode arguments if you want to process season or episode artwork for your tv shows (optionally specifying additional artwork types for season and/or episodes).

Here's the usage for mklocal.py (v0.2.2):
Code:
usage: mklocal.py [-h] [-l DIRECTORY] [-p PATH] [-A PATH] [-i [FILENAME]] [-o [FILENAME]]
                  [--dryrun] [-r] [--ignorebadprefix] [-a TYPE [TYPE ...]]
                  [-c TYPE [TYPE ...]] [-s [TYPE [TYPE ...]]] [-e [TYPE [TYPE ...]]] [-1]
                  [-nk] [--info] [-q | -v]

Downloads specific artwork types (default: clearart, clearlogo) based on urls in media
library (ie. original source) creating local versions. Avoids retrieving artwork from XBMC
Texture Cache as this is often resized, resampled and of lower quality. Optionally output
data that can be used to update the media library to use new local versions of artwork,
replacing any current remote versions. The same data will also remove invalid remote
artwork from the library.

optional arguments:
  -h, --help             show this help message and exit
  -l DIRECTORY, --local DIRECTORY
                         Local DIRECTORY into which artwork will be WRITTEN, eg.
                         /freenas/media/
  -p PATH, --prefix PATH
                         XBMC PATH prefix (eg. nfs://192.168.0.3/mnt/share/media/) that
                         will be substituted by --local DIRECTORY when traversing media
                         files. This is typically the root of the media source as defined
                         in sources.xml
  -A PATH, --altlocal PATH
                         Alternate local directory which may contain artwork that can be
                         READ and copied to --local, could be the original source folder
  -i [FILENAME], --input [FILENAME]
                         Optional FILENAME containing JSON movie/tvshow data for
                         processing. Read from stdin if FILENAME is - or not specified
  -o [FILENAME], --output [FILENAME]
                         Output a data structure suitable for consumption by
                         texturecache.py [test]set, used to update an XBMC media library
                         converting remote urls into local urls. Written to stdout if
                         FILENAME is - or not specified
  --dryrun               Don't create anything (although downloads will be attempted)
  -r, --readonly         Don't download (or, if specified, copy from --altlocal) new
                         artwork, only use existing --local artwork
  --ignorebadprefix      Don't display a warning for media files with a path that does not
                         match that set by --prefix
  -a TYPE [TYPE ...], --artwork TYPE [TYPE ...]
                         Artwork TYPE(s) for download, eg. "--artwork discart banner"
                         Specify TYPE:SUFFIX if SUFFIX differs from TYPE, eg. "--artwork
                         thumb:poster" would create "thumb" library items with a "-poster"
                         filename suffix
  -c TYPE [TYPE ...], --check TYPE [TYPE ...]
                         Check the named artwork TYPE(s) - or "all" - and warn if any
                         internet (http) URLs are detected
  -s [TYPE [TYPE ...]], --season [TYPE [TYPE ...]]
                         For TV Shows, process season items (default: poster banner
                         landscape)
  -e [TYPE [TYPE ...]], --episode [TYPE [TYPE ...]]
                         For TV Shows, process episode items (default: thumb)
  -1, --singlefolders    Movies are in individual folders so don't use the movie-name as a
                         prefix
  -nk, --nokeep          Don't keep artwork if not able to match with pre-existing local
                         artwork
  --info                 Display informational output to stdout
  -q, --quiet            Silence warnings about missing artwork (NEEDED etc.)
  -v, --verbose          Display diagnostic output

Minimum required arguments are --local, --prefix, --artwork (and --input, which if not specified is read from stdin).

For example, the following would download any remote artwork of the poster/fanart/clearart/clearlogo variety to a movie library rooted at /freenas/media, then associate any already existing or any just downloaded artwork with each movie, outputting changes to newartwork.dat:

Code:
./texturecache.py jd movies zombieland | ./mklocal.py --local /freenas/media --prefix nfs://192.168.0.3/mnt/share/media --artwork poster fanart clearlogo clearart --output newartwork.dat"

To apply the artwork changes to your media library:
Code:
cat newartwork.dat | texturecache.py set

then sit back as it can take a while to apply all of the updates! Hopefully future versions of Helix will be much, much faster.

Finally, pre-load your cache with the new artwork.

Give it a go, come back with any specific questions if you have any! 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
@Milhouse - I've messed around a little bit more with the seemingly untraceable errors that pop up. The only real sign is that when I restart the script it pops an error that it doesn't have i/o with the log file. The only way to get it to rerun is to reboot openelec and then it works fine again but as before with the same errors that start popping up.

So here is what I've learned: I'm leaning towards it not being a bad sd card because it seems like it happens extremely repeatably around 4 min after boot. I'm going to let it boot and be on for a while (20 -30 min) and see if it is 3-4 min after the script starts or what. But it is too repeatably consistent to be a sporadic sd card.

I'll keep you posted if I come up with anything.
Reply
See if you have any IO or filesystem errors being reported in dmesg. Include a screen capture (or copy the console text) of the errors you are seeing.
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
http://pasteboard.co/5SURXWd.png

Yeah you were right, never should have doubted you. But it does confirm I was onto something with the whole 4 minutes thing. It was switching the OS to read only at a sudo specific interval....so many failed writes.

Is it worth attempting to reformat the sd card or should I just throw it away?
Reply
Definitely try reformatting, and if the reformatted SD card fails with the same error then try a different SD card (ideally, use a different brand in case the Pi just doesn't like that particular brand of SD card - I've never had a problem with genuine Sandisk cards).
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
Dear MilhouseVH,

i have an problem with OE 4.0.1 on my Pi. When i try to install just nothing happens.

Webserver is on port 8080. Maybe the link is down?

best regards


OpenELEC (official) Version: 4.0.1
OpenELEC:~ # curl https://raw.github.com/MilhouseVH/textur...ster/textu
recache.py -o texturecache.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
OpenELEC:~ #
Reply
Seems to be a problem with OpenELEC curl in 4.0.1+ when communicating with github, I don't know a solution so you'll need to find another way to get the script on to the Pi. Save it on your PC and copy it across using Samba would be one option.

Edit: Ah OK, curl on OpenELEC (v7.36.0) isn't following the github redirect, whereas curl on Ubuntu - v7.32.0 - does follow the redirect, so maybe a recent change in curl to not follow redirects by default.

Adding "-L" will cause OE curl to follow the redirects, or just try downloading directly from this url instead which is where github redirects to:

Code:
curl https://raw.githubusercontent.com/MilhouseVH/texturecache.py/master/texturecache.py -o texturecach.py

I've updated the original post with the new direct github url, thanks for the heads up.
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
Now everything works fine!

thank you, great job and very fast solution

EDIT:

you've forgotten the "e" at first page

curl https://raw.githubusercontent.com/Milhou...recache.py -o texturecach.py

should be curl https://raw.githubusercontent.com/Milhou...recache.py -o texturecache.py
Reply
  •   
  • 1
  • 61
  • 62
  • 63(current)
  • 64
  • 65
  • 179
  •   
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average



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