• 1
  • 33
  • 34
  • 35(current)
  • 36
  • 37
  • 197
[RELEASE] Texture Cache Maintenance utility
(2013-11-23, 01:39)Enlightened Wrote: I know xbmc isn't caching the fanart I've added myself because when I go into the extrafanart folder and delete everything on my main machine
the art no longer shows up. When I re add it shows up again. So xbmc is reading the local HDD instead of adding to the thumbnail folder.

That is odd, and I can't really explain it, as that isn't really how XBMC is meant to work. Check your xbmc.log for errors (enabling debug may help) - maybe XBMC can't write to your thumbnails folder.

Can you paste the output from "jd movies <moviename>" where <moviename> is one of your movies that has this extrafanart? If it's your tv shows that have extrafanart, substitute "tvshows" for "movies" and upload the output to pastebin...

(2013-11-23, 01:39)Enlightened Wrote: My music is a smb path. But when I added in fanart myself the browser doesn't give me the option of adding it with a smb path so I have to add the folder. Everything I have is on a flexraid D:/music/artist with full sharing enabled.

Unless you have the Flexraid server mapped as the D:\ drive on all of your clients that D:\ path is simply not going to work. You need to find a way to add artwork that uses the smb path. Unfortunately I don't know why you can't select the smb path, that's maybe something to resolve first. Another option may be to try an addon such as Artwork Downloader which can find and use your local artwork, then set the correct smb path, but resolving your issue with smb browsing is probably the first step.
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
Quote:Unless you have the Flexraid server mapped as the D:\ drive on all of your clients that D:\ path is simply not going to work. You need to find a way to add artwork that uses the smb path. Unfortunately I don't know why you can't select the smb path, that's maybe something to resolve first. Another option may be to try an addon such as Artwork Downloader which can find and use your local artwork, then set the correct smb path, but resolving your issue with smb browsing is probably the first step.

artwork downloader works with music?

Solved my problem. when adding in artwork myself i was going straight to the extrafanart folder and adding longstringoftext.jpg. And it was not caching it to the thumbnails.
So I went back and copied longstringoftext.jpg to the artist folder and renamed to fanart.jpg then added that in xbmc and it finaly cached it to the thumbnails so now its adding it to my other machines.
I only had to manually add about 10 artist out of 300. So everything was perfect except for thoes 10 which was annoying.

thanks @Milhouse again for the awesome help.
Reply
(2013-11-23, 02:38)Enlightened Wrote: artwork downloader works with music?

Ah, maybe not - it supports musicvideo, not entirely sure what that is as I don't use it.
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-11-23, 02:40)MilhouseVH Wrote:
(2013-11-23, 02:38)Enlightened Wrote: artwork downloader works with music?

Ah, maybe not - it supports musicvideo, not entirely sure what that is as I don't use it.

concerts and music videos which scrapers aren't good at because not a lot of people use it. So no one adds to scraper databases.
Reply
Hey Milhouse,

I'm running into an bug with the imdb function, which I think is caused by attempting to get the rating of a movie that doesn't yet have one (ie, has less than 5 votes on imdb)

Code:
C:\Tools\python33>python texturecache.py imdb movies francisco
Traceback (most recent call last):val Volume 3: Live in San Francisco...
  File "texturecache.py", line 5405, in <module>
    main(sys.argv[1:])
  File "texturecache.py", line 5287, in main
    extraFields=_extraFields, query=_query)
  File "texturecache.py", line 2778, in jsonQuery
    updateIMDb(mediatype, jcomms, data)
  File "texturecache.py", line 3739, in updateIMDb
    newimdb = MyUtility.getIMDBInfo(imdbnumber, plotFull, plotOutline) if imdbnumber else None
  File "texturecache.py", line 2567, in getIMDBInfo
    newdata[newkey] = float(data[key])
ValueError: could not convert string to float: 'N/A'

Where the movie it's trying to scrape from imdb is http://www.imdb.com/title/tt2294804
Reply
(2013-11-23, 04:10)Serak Wrote: Where the movie it's trying to scrape from imdb is http://www.imdb.com/title/tt2294804

Many thanks, will add a fix to the next release.
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-11-23, 02:01)MilhouseVH Wrote:
(2013-11-23, 01:39)Enlightened Wrote: I know xbmc isn't caching the fanart I've added myself because when I go into the extrafanart folder and delete everything on my main machine
the art no longer shows up. When I re add it shows up again. So xbmc is reading the local HDD instead of adding to the thumbnail folder.

That is odd, and I can't really explain it, as that isn't really how XBMC is meant to work. Check your xbmc.log for errors (enabling debug may help) - maybe XBMC can't write to your thumbnails folder.

Can you paste the output from "jd movies <moviename>" where <moviename> is one of your movies that has this extrafanart? If it's your tv shows that have extrafanart, substitute "tvshows" for "movies" and upload the output to pastebin...

@Enlightened: Thanks for sending me your movie dumps and Textures13.db, it's starting to make a bit more sense.

If I understand how extrafanart is working, it's artwork that is only available to skins.

extrafanart doesn't appear in the media library, at least not as artwork assigned to any particular movie or tvshow. It exists within a special directory (/extrafanart, below the movie/tvshow) and the skin has to check for this directory and - if it exists - to then use (and display) whatever artwork files are present. This would explain why your extrafanart disappeared when you removed the extrafanart directory (or artwork) - the skin could no longer find anything to display.

It is possible to cache extrafanart however, so I'll see about adding similar directory checks (though it might be disabled by default). This extrafanart behaviour also has a knock-on effect for the prune functionality, as none of your cached extrafanart artwork is present in your media library and thus a prime candidate for removal. There's also extrathumbs which will need to be handled in the same way as extrafanart.

@Serak: I've just pushed v1.1.4 which fixes the N/A rating.
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-11-23, 04:45)MilhouseVH Wrote: @Serak: I've just pushed v1.1.4 which fixes the N/A rating.

That was quick! - Thanks for all your hard work Smile
Reply
texturecache.py (Version 1.1.5):
  • Add: extrafanart and extrathumbs support when caching artists, albums, movies, tags and tvshows, and when pruning. Enable with @cache.extra=yes to cache and prune both extrafanart and extrathumbs, or @cache.extrafanart=yes/@cache.extrathumbs=yes to enable specific cache & prune support for fanart or thumbs. By default all three options are disabled (ie. no).

@Enlightened: Please let me know how you get on. If there are any problems, a logfile would be most useful - add @logfile=c:\tc.log to your command line then email me the zipped tc.log file. Thanks.
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-11-23, 15:27)MilhouseVH Wrote: texturecache.py (Version 1.1.5):
  • Add: extrafanart and extrathumbs support when caching artists, albums, movies, tags and tvshows, and when pruning. Enable with @cache.extra=yes to cache and prune both extrafanart and extrathumbs, or @cache.extrafanart=yes/@cache.extrathumbs=yes to enable specific cache & prune support for fanart or thumbs. By default all three options are disabled (ie. no).

@Enlightened: Please let me know how you get on. If there are any problems, a logfile would be most useful - add @logfile=c:\tc.log to your command line then email me the zipped tc.log file. Thanks.

Awesome trying it now. thanks.

[edit] Not sure if I'm enabling it correctly. I'm putting c:\texturecache.py @cache.extrafanart=yes

but a list of commands comes up.
Reply
(2013-11-24, 03:06)Enlightened Wrote: [edit] Not sure if I'm enabling it correctly. I'm putting c:\texturecache.py @cache.extrafanart=yes

but a list of commands comes up.

The @property=value notation is an alternative to adding properties to your configuration file (texturecache.cfg). You would specify these command line properties in addition to whatever action you are trying to perform, eg:
Code:
c:\texturecache.py @cache.extrafanart=yes c movies

would pre-load the cache for your movies, with extrafanart support enabled.

Obviously if you want to permanently enable extrafanart support, then add:
Code:
cache.extrafanart=yes
to your texturecache.cfg file and you no longer need to specify this property on the command line (unless you wanted to temporarily disable it, as command line properties take priority over those in the configuration 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
Quote:Obviously if you want to permanently enable extrafanart support, then add:
Code:
cache.extrafanart=yes
to your texturecache.cfg file and you no longer need to specify this property on the command line (unless you wanted to temporarily disable it, as command line properties take priority over those in the configuration file).

Got it. Running now looks like its going good. Thank you.
Reply
Hi,

First of all just the script I most miss in XBMC as it is quite hard to replace and re-cache fanart in every movie (doing it manually i PITA)

I already have my desired fanart inside every movie folder locally. Would like to know the command to re-cache my movie and tvshow art replacing possible remote ones with my local art. Looking forward to also prune unused art to free some space.

I scrape my fanart using EmberMM (using CPS post-processing script) and i also update XBMC library but sometimes like to change fanart and would like to reload it automatically (using your script) on XBMC.

Great work! Smile
Image Image
Reply
(2013-11-24, 16:22)redglory Wrote: Hi,

First of all just the script I most miss in XBMC as it is quite hard to replace and re-cache fanart in every movie (doing it manually i PITA)

I already have my desired fanart inside every movie folder locally. Would like to know the command to re-cache my movie and tvshow art replacing possible remote ones with my local art. Looking forward to also prune unused art to free some space.

I scrape my fanart using EmberMM (using CPS post-processing script) and i also update XBMC library but sometimes like to change fanart and would like to reload it automatically (using your script) on XBMC.

Great work! Smile

If you want to replace your remote artwork with local artwork, you can use the mklocal.py script (which is in the tools folder on github. Download the source code and if using Linux, apply the correct permissions: chmod +x ./mklocal.py.

This script exists to download remote artwork to your local filesystem, but it will only do so if local artwork doesn't already exist (ie. it won't overwrite) so in your case there should be nothing to download. Also, having determined the availability of the relevant local artwork, the script can generate "workitems" to be passed to "texturecache.py set" in order to update your media library with the new local urls.

As your artwork is already available locally, you'll want to pass the --readonly switch so that mklocal.py won't download any of your current remote artwork and will only use whatever it finds locally. If you don't pass --readonly, it will download the remote artwork for artwork types that don't already exist locally, so you could leave it off and mklocal.py will then "fill in" any gaps in your local artwork collection by downloading whatever is missing. Probably best to specify --readonly to begin with though, at least until you feel comfortable with how it all works.

The trickiest part is mapping your XBMC source to your OS mount point, which is done with the --prefix and --local switches. For instance my XBMC source is "nfs://192.168.0.3/mnt/share/media" and the equivalent OS mount point is "/freenas/media" so the relevant switches for me are "--prefix nfs://192.168.0.3/mnt/share/media --local /freenas/media". This means the script can map "nfs://192.168.0.3/mnt/share/media" to "/freenas/media" and vice versa. It only requires this mapping in order to gain read/write access to your local media, all XBMC urls will retain their current prefix (nfs:, smb:, whatever).

I would suggest working with just a single movie until you get the hang of things.

Then it's just a case of "feeding" mklocal.py a list of movies or tvshows to process, eg:
Code:
./texturecache.py jd movies avatar | ./mklocal.py --readonly --prefix nfs://192.168.0.3/mnt/share/media --local /freenas/media --artwork poster fanart --output

The above command would output "workitems" for the movie Avatar IF any changes are required.

mklocal.py doesn't update your media library itself, it can only generate the "instructions" which must then be processed by "texturecache.py set". Example output from mklocal.py might be:
Code:
[
  {
    "items": {
      "art.poster": "nfs://192.168.0.3/mnt/share/media/Video/MoviesSD/Avatar (2009)[DVDRip]-poster.jpg"
    },
    "libraryid": 23,
    "type": "movie",
    "title": "Avatar"
  }
]

which is an instruction to set a new poster url on the movie.

Add "--season" and/or "--episode" switches if you want to also process artwork for your tvshow seasons and episodes.

Add additional artwork types (clearart, clearlogo, discart etc.) as you see fit.

Add the "-v" switch to view debug output and whatever processing is taking place.

See "./mklocal.py --help" for more details.

Once you are happy with how mklocal.py is working, pass the output to "texturecache.py set" in order to apply the changes to your media library, eg.:
Code:
./texturecache.py jd movies | ./mklocal.py --readonly --prefix nfs://192.168.0.3/mnt/share/media --local /freenas/media --artwork poster fanart --output | ./texturecache.py set

though note that JSON support for the modification of season art isn't supported until JSON API v6.10.0, which means a recent Gotham nightly - any attempts to change season art pre-v6.10.0 will result in a warning from "texturecache.py set" and the season art request will be ignored.

Updating movies via JSON can be quite a slow process and running workitems through "texturecache.py set" can take a while!

Once you have made changes to your media library you'll want to pre-load the cache with the now local artwork ("./texturecache.py c movies"), and finally prune your cache to remove all trace of the old remote artwork ("./texturecache.py P").

So just to be clear: As long as you pass "--readonly" to mklocal.py, no modifications will be made to your local filesystem. And as long as you don't pass anything to "texturecache.py set" no changes will be applied to your media 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
Thanks very much for your detailed info.

I have my movies inside E:\Movies each with movie name folder, like this:
Image

Uploaded with ImageShack.us

And have Frodo 12.2 installed.

Tried to run your script like this:
Code:
./texturecache.py jd movies | tools/mklocal.py --local E:/Movies --prefix E:/Movies --artwork fanart poster clearlogo clearart --output fixup.dat
which gave me lots of:
Code:
** SKIPPING **  - Bad Prefix - Zombieland                                  
[XBMC path does not match prefix] E:\Movies\Zombieland.(2009)\Zombieland.2009.BR-Disk.xvid.avi

am I looking into this in the wrong way?!

tc.log
Image Image
Reply
  • 1
  • 33
  • 34
  • 35(current)
  • 36
  • 37
  • 197

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