•   
  • 1
  • 58
  • 59
  • 60(current)
  • 61
  • 62
  • 178
  •   
[RELEASE] Texture Cache Maintenance utility
Nice script, I didn't even really think about the fact RaspBMC wouldn't automatically prune the stuff not on your HDD's etc. anymore.
I added it to my /.xbmc/userdata dir and "cp texturecache.py texturecache.cfg" so I can reach it from my Pi and run it without having to SSH into it every single time.

I'm getting these errors when running it on my Pi:

Code:
Traceback (most recent call last):
  File "./texturecache.py", line 7168, in <module>
    main(sys.argv[1:])
  File "./texturecache.py", line 6906, in main
    loadConfig(argv)
  File "./texturecache.py", line 6497, in loadConfig
    gConfig = MyConfiguration(argv)
  File "./texturecache.py", line 133, in __init__
    config.readfp(cfg)
  File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
    self._read(fp, filename)
  File "/usr/lib/python2.7/ConfigParser.py", line 546, in _read
    raise e
ConfigParser.ParsingError: File contains parsing errors: <???>
        [line 34]: 'import os, sys, platform, re, datetime, time\n'
        [line 35]: 'import socket, base64, hashlib\n'
        [line 36]: 'import threading, random\n'
        [line 37]: 'import errno, codecs\n'
        [line 38]: 'import subprocess\n'

By the way, is there a way to get this to run automatically and delete all artwork (thumbnails, posters, other big @ss stuff) not seen for about a week without having to constantly do this?
Like uhmm a cronjob? or just some random executable?
I'm on an 8GB SD card and I'm bound to forget to do this regularly ending with a Pi that doesn't want to boot (again, lol happened to me already Tongue).
I'm kind of building this Pi to do everything automatic so running this automatically and correctly would be awesome.

It's not like I'm bad with Linux but I suck at python so if you could tell me what I need to set up or something I'd be much obliged Smile.
Reply
You said the answer in your question - use cron!
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
Lol yeah but I figured there might be an "official way" stashed somewhere in the 60 pages before my post haha, cron should do the trick though Smile.

Still leaves me with the weird errors though Wink
Reply
(2014-04-08, 00:33)ThaMadHatter Wrote: I added it to my /.xbmc/userdata dir and "cp texturecache.py texturecache.cfg" so I can reach it from my Pi and run it without having to SSH into it every single time.

I'm getting these errors when running it on my Pi:

The errors are because you've copied texturecache.py to texturecache.cfg, and texturecache.py is complaining because texturecache.cfg is now garbage. I've no idea what you are hoping to achieve with "cp texturecache.py texturecache.cfg". Delete (rm) 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
Quite.
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
I copied it because uhmmm this:

Quote:Download the single Python script file - use "Save as" in your browser - from github. A default properties file is available on github, rename this to texturecache.cfg in order to use it, although in many cases it's not required and should just be considered a template - pick and choose what options you wish to override.

pretty much says to do so, I just noticed that you're talking about the template later on, didn't really get that out of the initial thingie hehe.

That seems to have done the trick, i'll have to customize the cfg later on Smile.

(which will most likely be a b*tch to set up to let it clean everything not used for 15 days or so lol)
Reply
Thanks again for the script. It really is a lifesaver when caching and reading from multiple hard drives that are not always online.

I am trying to output all the information about a TV Show to a log file. However, I do not know the syntax to output to a log file.

My code is:
Code:
texturecache.py jd tvshows "X-Files"
This displays ALL of the information for the overall show, each season, and each episode.

I want to:
1. Output the results of this search to a log file. What switch would I need to add to do that?
2. Limit my search to ONLY a specific type of file, ie: landscape. How would I go about doing this?

Thanks in advance for your help!
Reply
(2014-04-11, 18:42)radigast Wrote: I want to:
1. Output the results of this search to a log file. What switch would I need to add to do that?

Code:
texturecache.py jd tvshows "X-Files" > xfiles.dat

If you want to exclude episodes, add @query.episodes=no, and if you want to exclude seasons (and thus also episodes), add @query.seasons=no.

(2014-04-11, 18:42)radigast Wrote: 2. Limit my search to ONLY a specific type of file, ie: landscape. How would I go about doing this?

This isn't supported. You can specify the fields to be dumped with Jd (instead of jd, which gives you a default set of basic fields), however limiting the artwork by type isn't supported when dumping (this is however possible when caching). It would be easier to just ignore the artwork you're not interested in when processing your log.
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
Hey MilhouseVH,

thanks for your efforts in creating and keeping these scripts up to date Smile
I've successfully cleaned my media library and did not encounter any problems!

Might be a simple thing (I think this could be done with mklocal.py?), but: how can I delete the currently cached artwork from the RPi and recache the data from my local sources?
I'm scraping the tv shows and movies on my desktop pc and would like to use the already existing images (already downloaded and inside the directory structures) to populate the RPi texture cache.
As far as I'm able to tell, texturecache.py only retrieves files from the internet?
Any way to cache files (= populate RPi media library) by retrieving them from my physical sources instead of downloading them?

I'm sure this is somehow possible and I am just not clever enough to figure it out Wink

Thanks again and happy easter!

PS: the builtin stress-test is a fine thing, I've been able to figure out potentially stable clocks and voltages MUCH faster than before!
Reply
(2014-04-20, 12:06)Cy4n1d3 Wrote: Might be a simple thing (I think this could be done with mklocal.py?), but: how can I delete the currently cached artwork from the RPi and recache the data from my local sources?
I'm scraping the tv shows and movies on my desktop pc and would like to use the already existing images (already downloaded and inside the directory structures) to populate the RPi texture cache.

Easiest way is to delete Textures13.db and your Thumbnails folder, then restart XBMC - this will leave you with an empty cache which can then be populated by your new artwork. Where the artwork comes from is determined by your media library, if that is pointing at remote artwork then the artwork will be downloaded from the internet, if it's local it will be retrieved locally.

Alternatively running "C tvshows/C movies" will forcibly re-cache all tvshow & movie artwork and achieve more or less the same result.

If you're scraping on a PC with local artwork then I'm assuming you're using MySQL so that the Pi has access to the same library, in which case your Pi should be referencing the same local artwork. If not, that's a configuration issue for you to solve with your current setup. You could use mklocal.py to convert remote artwork to local, or even use mklocal.py to remove just the remote artwork, but since you're scraping on a PC I'm not really sure that's your best option which would be MySQL.

Once you've performed a scrape on the PC and updated the MySQL media library, pre-load the texture cache on the Pi (c tvshows/c movies) which is referencing the same media libary and then both the PC and Pi should be fully up to date with the same artwork.

(2014-04-20, 12:06)Cy4n1d3 Wrote: As far as I'm able to tell, texturecache.py only retrieves files from the internet?
Any way to cache files (= populate RPi media library) by retrieving them from my physical sources instead of downloading them?

No, texturecache,py will cache whatever artwork is referenced by the media library - if the artwork is local or remote, and accessible, it will be cached by XBMC. texturecache.py is just the puppet master, pulling the strings, it's XBMC that is doing all the hard work of accessing the files and caching the images.

(2014-04-20, 12:06)Cy4n1d3 Wrote: PS: the builtin stress-test is a fine thing, I've been able to figure out potentially stable clocks and voltages MUCH faster than before!

Great, that's the idea! 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
Thanks for the insight, I'll have a look into it when I'm home today!
Reply
Thanks again for your help MilhouseVH! I really do appreciate your friendliness and savvy! Smile
Reply
MilhouseVH, Thanks for getting me onto your script. Looks like I got it installed mostly correctly. Here is what I'm seeing:

http://pastebin.com/WSdNdtsF

It's not able to download the images from the internet looks like?

I'm also not getting any returns for searches.
s "Son of Batman"
Matching row ids:
is just blank for everything?

edit: I did just realize that I ran clean and now nothing is showing up on the library so I may have to rescrape / re add sources. I'll keep fiddling but I'm thinking this will get me closer than jiggery pockery I was doing before.
Reply
Can you check your xbmc.log - it's xbmc that is failing to download the artwork.

You may need to enable debug. For some reason XBMC can't access your artwork, sometimes this can be due to a temporary website issue, or worst case the remote files may permanently no longer be available (one of the perennial problems when using remotely hosted artwork). However in this case the site and artwork appears to be available, so maybe your XBMC client is having network issues? Hopefully there will be more details in xbmc.log.

As for "Son of Batman", if it's not being returned it's either not in the cache, or it's there with a different name. Look at the movie details with "jd movies "son of batman"" to get an idea of what artwork files are being referenced and thus likely to be in the cache (assuming they've been cached).
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
So, of course I'm new, and I have a really silly question. This thread is a lot to take in and quite a challenge to process it all. At no fault of the forum or the thread, but the blames lie entirely on my own ignorance and, well-shall we say myself being a late-bloomer to the xbmc scene.. So if anyone could help me out, just to simply things with my question I would be ever so grateful... I have a atv1 with a crystalbuntu running frodo.. I want to delete my thumbnails since it will cause no harm and only free up space? I know how to ssh with putty, but that's all.... Let me clarify, I know how to get in to ssh through putty but that's about it... I don't know what to type where, what line, what prompts. Can anyone please point me in the direction that lays out in 3rd grade terms exactly how to do this for my atv1...... Sorry ahead of time if I'm in the wrong spot...
Reply
  •   
  • 1
  • 58
  • 59
  • 60(current)
  • 61
  • 62
  • 178
  •   
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average



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