• 1
  • 35
  • 36
  • 37(current)
  • 38
  • 39
  • 197
[RELEASE] Texture Cache Maintenance utility
(2013-11-25, 13:58)MilhouseVH Wrote:
(2013-11-25, 13:01)redglory Wrote: My stacked movie fanart are defined as: Movie.dvdrip.cd1.avi | Movie.dvdrip.cd2.avi is set as Movie.dvdrip-fanart.jpg (it removes part numbering)

OK there's a new version of mklocal.py up on github that should support this, it will strip out the cd/disc/part/whatever so in the above case it should find artwork named as "Movie.dvdrip-fanart.jpg" (fingers crossed).

I'll let you know as soon as I get home Smile

Thanks mate!
Image Image
Reply
Here it is my log

And this is what I have on my textures13.db regarding Zombieland:

Code:
E:\Movies\Zombieland.(2009)/clearart.png
E:\Movies\Zombieland.(2009)\banner.jpg
E:\Movies\Zombieland.(2009)\Zombieland.2009.BR-Disk.xvid-poster.jpg
E:\Movies\Zombieland.(2009)\Zombieland.2009.BR-Disk.xvid-fanart.jpg

Don't have logo cached and as you've stated, slash and backslash are the cause of converting clearart Smile

Looks great!
Image Image
Reply
Cool, time to pull the trigger and update your media library with "texturecache.py set" ! Smile

Although I thought you said you had remote artwork, when much of your library artwork appears to be local (but mangled), in which case "texturecache.py fixurls | texturecache.py set" would work well 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
(2013-11-26, 00:48)MilhouseVH Wrote: Cool, time to pull the trigger and update your media library with "texturecache.py set" ! Smile

Although I thought you said you had remote artwork, when much of your library artwork appears to be local (but mangled), in which case "texturecache.py fixurls | texturecache.py set" would work well for you.

It's being updated! All my artwork is local but not in XBMC library... That's why I want to re-cache everything!

This takes some time... now, updating Ocean's 13 Smile
Image Image
Reply
(2013-11-26, 01:31)redglory Wrote: It's being updated! All my artwork is local but not in XBMC library... That's why I want to re-cache everything!
Ah right, OK. Smile

(2013-11-26, 01:31)redglory Wrote: This takes some time... now, updating Ocean's 13 Smile
Yes, applying updates to the database with JSON can be slow, particularly if you have cast artwork - every row for the movie is deleted from the database even if you are updating only a single field, this can mean hundreds of rows being deleted then reinserted, just to change the value of one column on one row! Eek It's the kind of thing you might want to leave running overnight... Smile

At least if you re-run this again it will only apply the changes that need to be changed, so once you've got the mass of updates out of the way, future runs should be relatively quick as you won't have so many changes.
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
All done for Movies (fanart poster clearlogo clearart)!

Tomorrow will look into tvshows Smile

Thanks!
Image Image
Reply
texturecache.py (Version 1.1.8):
  • Add: rbphdmi option to manage Raspberry Pi HDMI power saving. Default delay is 900 seconds after screensaver has activated, specify alternative delay in seconds as second argument. View event activity with @debug=yes. Specify location of tvservice binary with @bin.tvservice property (default is /usr/bin/tvservice). Due to nature of operation, requires xbmc.host to be localhost.

To start automatically on OpenELEC, add to /storage/.config/autostart.sh as follows:
Code:
(sleep 20 && /storage/texturecache.py @logfile= @xbmc.host=localhost rbphdmi) &
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,

I'm trying to run:
Code:
python texturecache.py c movies
which is giving this error:

Code:
Traceback (most recent call last):
  File "texturecache.py", line 5867, in <module>
    main(sys.argv[1:])
  File "texturecache.py", line 5745, in main
    extraFields=_extraFields, query=_query)
  File "texturecache.py", line 3132, in jsonQuery
    cacheImages(mediatype, jcomms, database, data, title_name, id_name, force, n
odownload)
  File "texturecache.py", line 3175, in cacheImages
    parseURLData(jcomms, mediatype, mediaitems, imagecache, data, title_name, id
_name)
  File "texturecache.py", line 3424, in parseURLData
    for file in jcomms.getExtraArt(item):
  File "texturecache.py", line 1763, in getExtraArt
    for file in data["result"]["files"]:
TypeError: 'NoneType' object is not iterable

I've spotted the main(sys.argv[1:] and tried using command like
Code:
python texturecache.py c movies zombie
and everything runs as expected.

Anything I might be missing?!
Image Image
Reply
@redglory, can you run:
Code:
python texturecache.py c movies @logfile=c:\tc.log
and send me the file tc.log. I suspect I know what is going on, but will need some additional information to confirm, 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
Here you go: log

It seems you always expect a folder with files inside. Smile

Code:
2013-11-28 23:18:31.254000:MainThread: libDirectory.JSON SOCKET REQUEST: [{"jsonrpc": "2.0", "params": {"directory": "E:\\Movies\\42.(2013)\\extrathumbs\\"}, "method": "Files.GetDirectory", "id": "libDirectory"}]
2013-11-28 23:18:31.256000:MainThread: libDirectory.BUFFER RECEIVED (len 100)
2013-11-28 23:18:31.256000:MainThread: libDirectory.PARSING JSON DATA: {"id":"libDirectory","jsonrpc":"2.0","result":{"files":null,"limits":{"end":0,"start":0,"total":0}}}
2013-11-28 23:18:31.256000:MainThread: libDirectory.PARSING COMPLETE, elapsed time: 0.000000 seconds
2013-11-28 23:18:31.256000:MainThread: libDirectory.RECEIVED LIMITS: {u'start': 0, u'total': 0, u'end': 0}
2013-11-28 23:18:31.257000:MainThread: libDirectory.FINISHED, elapsed time: 0.003000 seconds

Forgot to mention that I have configured to cache both extrafanart and extrathumbs!
Image Image
Reply
(2013-11-29, 01:48)redglory Wrote: Here you go: log

Thanks

(2013-11-29, 01:48)redglory Wrote: It seems you always expect a folder with files inside. Smile

Yes, and I've hit this problem before, so my mistake. It appears that some systems (maybe older XBMC versions) return "null" for "files" on empty directories, rather than no files property (or even just an empty list) whenever there are no files. I have a centralised GetDirectory method which I should have used on this occasion (when looking up the extra* art), but didn't.... now all Files.GetDirectory access goes through the centralised method which includes a work around for the data issue...

Thanks for reporting.

texturecache.py (Version 1.1.9)
  • Chg: Tweak rbphdmi logic slightly: Check HDMI has actually turned on/off; don't turn off HDMI if the TV/monitor has been powered off (if supported by TV/monitor - if not, assume "always on" with @hdmi.force.hotplug=yes).

texturecache.py (Version 1.2.0)
  • Fix: null being returned for files from Files.GetDirectory call on some systems - ensure centralised method used everywhere
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
Will try it while at home.

Thanks Smile
Image Image
Reply
Now it's throwing this error:
Code:
Traceback (most recent call last):0, Multi thread 3951
  File "texturecache.py", line 5872, in <module>
    main(sys.argv[1:])
  File "texturecache.py", line 5750, in main
    extraFields=_extraFields, query=_query)
  File "texturecache.py", line 3137, in jsonQuery
    cacheImages(mediatype, jcomms, database, data, title_name, id_name, force, n
odownload)
  File "texturecache.py", line 3307, in cacheImages
    if gLogger.VERBOSE and gLogger.LOGGING: gLogger.log("QUEUE ITEM: %s" % item)

  File "texturecache.py", line 2704, in __str__
    self.libraryid, self.missingOK)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 17: ordinal
not in range(128)

Here is my tc.log

Code:
f not MyUtility.isPython3:
      try:
        v = bytes(v.encode("iso-8859-1")).decode("utf-8")
      except UnicodeDecodeError:
        pass

    return v

It seems problem is in this encode/decode line:
Code:
v = bytes(v.encode("iso-8859-1")).decode("utf-8")

Can't decode
Code:
Character    ISO-8859-1    Unicode    UTF-8    Bytes    Name
à           0xC3             0x00C3    0xC3,     0x83    Latin Capital Letter A With Tilde

It might be because you'll first need to encode 'ascii' to 'unicode' and then to 'utf-8'?
Image Image
Reply
@redglory: Thanks for the report and the log.

The problem appears to be with Les Misérables, and the extrafanart/extrathumbs files (that have to be quoted) not being converted to unicode strings as part of the quoting process so they don't subsequently encode/decode correctly, and eventually blow up when logged/output. The encode/decode you highlighted fails because the input string is not unicode, when it should be.

Although I've not been able to reproduce your exact error on my system, I've uploaded v1.2.1 which hopefully fixes the issue. If you could test and let me know that would be great, 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
Just an update to say I've now reproduced the problem reported by redglory and the fix in v1.2.1 does the trick!
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
  • 35
  • 36
  • 37(current)
  • 38
  • 39
  • 197

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