•   
  • 1
  • 10
  • 11
  • 12(current)
  • 13
  • 14
  • 178
  •   
[RELEASE] Texture Cache Maintenance utility
I could of swore I used this a while ago on my atv2, just tried latest version but get the following. Any advice or is this simply not usable on atv2?

/usr/bin/env: python: No such file or directory

cheers
Reply
(2013-06-14, 22:02)RazorFR Wrote: here it is

So yes, you have season-all posters in your TV show directory

Code:
{"file":"F:\\My TV Shows\\Battlestar Galactica (2003)\\season-all-poster.jpg","filetype":"file","label":"season-all-poster.jpg","type":"unknown"}

but your scraper has not scraped it, for some reason, which means it can't be downloaded (and thus cached).

I'm guessing you don't see the "* All seasons" poster when your browse your shows? Is "* All seasons" a setting that needs to be enabled in XBMC (I can't remember!)

Edit: This post explains how to suppress "All Seasons" - it's not enabled by default - have you added this to your advancedsettings.xml? I don't have this, so my "All Seasons" works as expected. If necessary I can add an option to disable All Seasons processing...


(2013-06-14, 22:05)liv3wire Wrote: I could of swore I used this a while ago on my atv2, just tried latest version but get the following. Any advice or is this simply not usable on atv2?

/usr/bin/env: python: No such file or directory

cheers

Looks like a Python configuration/path issue on the ATV2.

Try running it with "<path to python binary>/python ./texturecache.py"
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
Yes indeed
I have <hideallitems>true</hideallitems> in my advancedsettings for video library.

I guess that is fine then, it is not a real error, it is something that the script cannot guess. I can live with it Big Grin

Thanks again for this useful and powerful tool.
Reply
(2013-06-14, 22:33)RazorFR Wrote: I guess that is fine then, it is not a real error, it is something that the script cannot guess. I can live with it Big Grin

I'm sure you'd rather not see the errors! Smile

Update to v0.7.8 and add "cache.hideallitems=yes" to your properties 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
Even better
Thank you Sir!
Reply
Here is my log file, in the correct thread Smile

http://sprunge.us/GWTB
Reply
(Original post)

(2013-06-15, 08:59)teeedubb Wrote: Here is my log file, in the correct thread Smile

http://sprunge.us/GWTB

Thanks!

I see you have PVR TV channels but no PVR Radio channels. I've just uploaded v0.7.9 which should handle this situation.
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
(2013-06-15, 09:06)MilhouseVH Wrote: Thanks!

I see you have PVR TV channels but no PVR Radio channels. I've just uploaded v0.7.9 which should handle this situation.

Thanks, its completing without error now.
Reply
Hi,

I have a fresh openelec 3.0.6 (which is frodo). I have a video and music library in MySQL on my server. My XBMC box can see my media and the database. I want to just update all the thumbnails, since I lost them when I upgraded. I am hoping texturecache.py can help.

I installed it and a config file in /storage. I run ./texturecache.py c and this is my output. I see it loop through all my media, but it doesn't seem to download anything. What am I missing?

Thanks,

Allan

Code:
openelec-zotac:~ # ./texturecache.py c
Need to cache: [  fanart  ] for addon: Confluence
Need to cache: [thumbnail ] for addon: Confluence

Caching artwork: 0 items remaining of 2 (s: 0, m: 0), 0 errors, 2 threads activeCaching artwork: 0 items remaining of 2 (s: 0, m: 0), 1 error, 1 thread active (28.28 downloads per second, ETA: 00:00:00)  

The following items could not be downloaded:

[fanart    ] [Confluence                              ] image:///usr/share/xbmc/addons/skin.confluence/fanart.jpg/
                                                                          
Cache pre-load activity summary for "addons/agenres/vgenres/albums/artists/movies/sets/tvshows":

              |    fanart   |    poster   |    thumb    |  thumbnail  |    TOTAL    
--------------+-------------+-------------+-------------+-------------+-------------
Cached        |      -      |      -      |      -      |      1      |      1      
Deleted       |      -      |      -      |      -      |      -      |      0      
Duplicate     |      -      |      -      |      -      |      -      |      0      
Error         |      1      |      -      |      -      |      -      |      1      
Ignored       |      -      |      -      |      3      |      -      |      3      
Season-all    |      -      |      -      |      -      |      -      |      0      
Skipped       |      1      |      -      |      -      |      27     |      28    
Undefined     |     447     |      -      |      -      |     514     |     961    
====================================================================================
TOTAL         |     449     |      -      |      3      |     542     |     994    
Download Time | 00:00:00.05 |      -      |      -      | 00:00:00.02 | 00:00:00.05

  Threads Used: 2
   Min/Avg/Max: 17.08 / 28.28 / 39.48

       Loading: 00:00:25.99
       Parsing: 00:00:00.77
     Comparing: 00:00:00.04
   Downloading: 00:00:01.00
TOTAL RUNTIME: 00:00:27.82
Reply
(2013-06-17, 02:22)AllanMarcus Wrote: What am I missing?

It looks like your media library is missing virtually all of it's artwork.

That is to say, the MySQL database has artwork references, but they are empty ("undefined").

447 of your media items have no fanart defined, and 514 no thumbnails defined. 28 items do have thumbnails, although they are all using the same thumbnail which has been successfully cached once, with the other 27 references "skipped" over.

So it looks like you have about 530 or so items in your library (including addons and genres) - does this sound about right?

To confirm what is in your media library, dump the JSON entry for one of your movies - let's say you have the movie Avatar in your library, so run:

Code:
./texturecache.py jd movies avatar

and you should see the fanart and thumbnail values, in your case it should be something like the following:
Code:
[
  {
    "movieid": 23,
    "title": "Avatar",
    "art": {
      "fanart": "",
      "thumbnail": ""
    },
    "label": "Avatar"
  }
]

Obviously, there should be values for the "fanart" and "thumbnail" properties (although in Frodo, "thumbnail" should now be "poster").

Assuming I'm right, I'd say the upgrade has failed and you're probably best off starting from scratch with a newly scraped library.
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
(2013-06-17, 03:01)MilhouseVH Wrote:
(2013-06-17, 02:22)AllanMarcus Wrote: What am I missing?

It looks like your media library is missing virtually all of it's artwork.

That is to say, the MySQL database has artwork references, but they are empty ("undefined").

447 of your media items have no fanart defined, and 514 no thumbnails defined. 28 items do have thumbnails, although they are all using the same thumbnail which has been successfully cached once, with the other 27 references "skipped" over.

So it looks like you have about 530 or so items in your library (including addons and genres) - does this sound about right?

To confirm what is in your media library, dump the JSON entry for one of your movies - let's say you have the movie Avatar in your library, so run:

Code:
./texturecache.py jd movies avatar

and you should see the fanart and thumbnail values, in your case it should be something like the following:
Code:
[
  {
    "movieid": 23,
    "title": "Avatar",
    "art": {
      "fanart": "",
      "thumbnail": ""
    },
    "label": "Avatar"
  }
]

Obviously, there should be values for the "fanart" and "thumbnail" properties (although in Frodo, "thumbnail" should now be "poster").

Assuming I'm right, I'd say the upgrade has failed and you're probably best off starting from scratch with a newly scraped library.


I'm ok with that, but I don't want to lose my "what's been watched" list. How can I re-scrape?
Reply
(2013-06-17, 05:58)AllanMarcus Wrote: I'm ok with that, but I don't want to lose my "what's been watched" list.

If you want to keep your watched status, you could try this addon which is meant to save/restore watched lists, though I've not tried it myself. Normally you'd export your media library with the watched statuses, but since your media library is now somewhat incomplete I'm not sure this an option that is open to you.

As for saving watch lists, I'll consider adding similar support to texturecache.py over the next few days as it seems to be a popular thing to do.

(2013-06-17, 05:58)AllanMarcus Wrote: How can I re-scrape?

Typically, you'd drop your existing MySQL databases, delete Textures13.db and Thumbnails folder, reboot XBMC so that it can recreate the MySQL and Textures13.db databases and also the Thumbnails folder, then add your sources.
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
Version 0.8.3
* Add: New option watched, allowing backup and restoration of movie and tvshow watched statuses (and in Gotham, also resume points).

When restoring a watched status/resume point, more recent playcount, lastplayed and (in Gotham) resume point positions will be retained unless the property watched.overwrite=yes is specified, in which case the watched statuses and resume points will be restored exactly as per the backup.

Watch statuses will be restored based on the name and year of the movie, or TV show name, season and episode number, so if these properties change between when the backup is taken and when it is restored, some watch statuses may not be able to be restored.

Examples:
Code:
./texturecache.py watched movies backup ./movies.dat
./texturecache.py watched movies restore ./movies.dat

./texturecache.py watched tvshows backup ./tvshows.dat
./texturecache.py watched tvshows restore ./tvshows.dat
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 for the great script! It's making XBMC much more smooth!

I'm wondering about remotely running this script. It seems like you need to have the remote computer's userdata dir accessible on your local computer. Is that correct?

Here's what I'm trying to do, and results: (I had this working by mounting the remote userdata with sshfs, but I switched over to OpenElec which doesn't have this)

Code:
./texturecache.py lc @config=./texturemulti.cfg @section=bedroom

Result:
Code:
FATAL: The task you wish to perform requires read/write file
       access to the XBMC sqlite3 Texture Cache database.

       The following sqlite3 database could not be opened:
       /private/var/mobile/Library/Preferences/XBMC/userdata/Database/Textures13.db

       Check settings in properties file ./texturemulti.cfg

The config file:
Code:
sep = |
dbfile = Database/Textures13.db
thumbnails = Thumbnails
webserver.port = 8080
webserver.username = xbmc
webserver.password = supersecretinfo
rpc.port = 9090
orphan.limit.check = yes

[livingroom]
xbmc.host = 10.0.1.20
userdata = /storage/.xbmc/userdata/
download.threads = 2
cache.castthumb = yes
lastrunfile=/storage/lrf_lounge.dat
  
[bedroom]
xbmc.host = 10.0.1.25
userdata = /private/var/mobile/Library/Preferences/XBMC/userdata/
download.threads = 1
cache.castthumb = no
lastrunfile=/storage/lrf_bedroom.dat

Thanks!
Reply
(2013-06-27, 00:27)iRobie Wrote: Thank you for the great script! It's making XBMC much more smooth!

Thanks, glad you find it useful. Smile

(2013-06-27, 00:27)iRobie Wrote: I'm wondering about remotely running this script. It seems like you need to have the remote computer's userdata dir accessible on your local computer. Is that correct?

For some functions, yes, but not all. The following options will require read/write access to Textures13.db: s, S, x, X, f, c, C, nc, lc, lnc, qa, qax, d, r, R, p, P although qa/qax no longer have a dependency on Textures13.db so I'll remove it in the next release.

(2013-06-27, 00:27)iRobie Wrote: Here's what I'm trying to do, and results: (I had this working by mounting the remote userdata with sshfs, but I switched over to OpenElec which doesn't have this)

So the remote "bedroom" client is OpenELEC? What is the local client OS (the one on which you are running the script), and how have you mounted /private/var/mobile/Library/Preferences/XBMC/userdata?

Assuming the remote client is OpenELEC, it will be sharing the Userdata folder as an SMB share. If you are able to mount Userdata on your local machine using SMB (CIFS), you should have read/write access to Database/Textures13.db and be able to run the lc option.

As an example, to mount the OpenELEC Userdata share on Ubuntu 12.10, the following mount command works for me:

Code:
sudo mount -t cifs //10.0.1.25/Userdata /mnt/userdata -o sec=ntlmv2,username=,password=

The "sec=ntlmv2" option is crucial to mounting OpenELEC SMB shares it would seem.

The above command will mount the OpenELEC files so that they are seen by the local system as owned by root, which will mean you need to run the script as root to have full write access. To avoid this, mount the share so that files are owned by a local user, eg. a user with uid=1001 and a gid=1001 meaning you can run the script under the account associated with uid 1001:
Code:
sudo mount -t cifs //10.0.1.25/Userdata /mnt/userdata -o sec=ntlmv2,username=,password=,uid=1001,gid=1001

Use the command "id <username>" to see which id and groups are associated with a specific user.

If I've misunderstood your precise setup let me know and I'll try to come up with another suggestion.
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
  • 10
  • 11
  • 12(current)
  • 13
  • 14
  • 178
  •   
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average



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