Posts: 17,855
Joined: Jan 2011
Reputation:
1,056
Milhouse
Retired Team-Kodi Member
Posts: 17,855
That's a lot of errors... What kind of images are failing? Embedded images (eg. image://video@nfs etc.) are a known problem but by default they should be ignored (cache.ignore.types property). Some web sites might be limiting concurrent downloads, but with only 2 threads that shouldn't be a problem.
The script is asking XBMC to perform the actual download, so any communication errors will be logged in the XBMC log file. The script (if you enable logging for texturecache.py) will only report that it wasn't able to download an image from XBMC, it won't know why as only XBMC knows that for sure.
By the way, what version of XBMC are you running on your iMac - I noticed in the log you posted that you're running v6.5.2 of the JSON API, which would suggest a fairy recent Gotham build and might explain the difference between your system and mine with respect to those empty folders (I'm still running Frodo 12.2, with JSON API v6.0.3).
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.
Posts: 41
Joined: May 2008
Reputation:
0
wishie
Junior Member
Posts: 41
2013-07-04, 15:01
(This post was last modified: 2013-07-04, 15:20 by wishie.)
Never thought I'd be so happy to get 0 output from a command:
localhost:temp wishie$ ./texturecache.py missing tvshows "TVShows"
localhost:temp wishie$ ./texturecache.py missing movies "Movies"
localhost:temp wishie$
Now to just check the artwork is all ok, then rejoice!
Yes I'm running a recent nightly... I didn't really want to, but since I use my iMac for development, its currently running OS X 10.9 DP2.. Frodo 12.2 doesn't run on it, so I needed to move to a nightly. I have installed the same build (except of course for ATV2) on the ATV2's.
As for artwork, Ive got it down to the following on my iMac:
localhost:temp wishie$ ./texturecache.py c movies
Need to cache: [ fanart ] for movie: Happythankyoumoreplease
Need to cache: [ poster ] for movie: Happythankyoumoreplease
Caching artwork: 0 items remaining of 2 (s: 0, m: 0), 2 errors, 2 threads active (03.66 downloads per second, ETA: 00:00:00)
The following items could not be downloaded:
[poster ] [Happythankyoumoreplease ] image://nfs://192.168.1.10/mnt/user/Movies/Happythankyoumoreplease (2011)/Happythankyoumoreplease .2011.DvDRip.x264.Feel-Free-poster.jpg/
[fanart ] [Happythankyoumoreplease ] image://nfs://192.168.1.10/mnt/user/Movies/Happythankyoumoreplease (2011)/Happythankyoumoreplease .2011.DvDRip.x264.Feel-Free-fanart.jpg/
Cache pre-load activity summary for "movies":
| fanart | poster | thumb | TOTAL
--------------+-------------+-------------+-------------+-------------
Cached | - | - | - | 0
Deleted | - | - | - | 0
Duplicate | 53 | 46 | - | 99
Error | 1 | 1 | - | 2
Ignored | - | - | - | 0
Skipped | 1535 | 1556 | 30 | 3121
Undefined | - | - | - | 0
======================================================================
TOTAL | 1589 | 1603 | 30 | 3222
Download Time | 00:00:00.41 | 00:00:00.40 | - | 00:00:00.41
Threads Used: 2
Min/Avg/Max: 2.44 / 3.66 / 4.87
Loading: 00:00:03.60
Parsing: 00:00:00.05
Comparing: 00:00:00.86
Downloading: 00:00:01.00
TOTAL RUNTIME: 00:00:05.54
NOTE: I fixed the above error by removing the bad filenames and images for that movie, and rescraping it into the database
As for the ATV2's, I will try with them again later.
Posts: 155
Joined: Sep 2009
Reputation:
2
fnwc
Senior Member
Posts: 155
Thanks for writing this, MilhouseVH. This solves a lot of my problems when I'm trying to refresh non-standard images (such as TV season fanart).
Posts: 31,445
Joined: Jan 2011
Kept meaning to do this before, but made a wiki page for this to list it with the other supplementary tools:
Texture Cache Maintenance (wiki). Feel free to do with the page as you wish.
Posts: 41
Joined: May 2008
Reputation:
0
wishie
Junior Member
Posts: 41
That seems to have helped ALOT. I am still getting some errors, but most downloads are succeeding now.. Now to figure out why DNS lookups are taking so long, causing CURL to time out
Posts: 17,855
Joined: Jan 2011
Reputation:
1,056
Milhouse
Retired Team-Kodi Member
Posts: 17,855
Yes, DNS resolution seems to be a problem that several people have experienced, if you find a cause it would be useful to know. Adding hosts manually is a temporary workaround, but certainly not a permanent fix! As to a cause, maybe there's a problem with UDP on your network?
I run a headless Pi with Raspbian for my network services, using dnsmasq for DHCP/DNS and have no problems so if it's an incompatibility with your ISP router (which I'm assuming is also handling DHCP) then that might be one possible solution. Manually setting your DNS to avoid your router might also help (try 8.8.8.8 and 4.4.4.4 for Google DNS).
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.
Posts: 41
Joined: May 2008
Reputation:
0
wishie
Junior Member
Posts: 41
I will give those a go once this run of the script finishes.. I will keep you updated, thanks
Posts: 41
Joined: May 2008
Reputation:
0
wishie
Junior Member
Posts: 41
So the issue ended up being related to WiFi, but not in the usual way..
Basically, I noticed that doing a DNS lookup to *any* external name server was taking roughly 5 seconds.. This is WAY too long, and XBMC gives up long before that..
Now, while my RPi was working perfectly well for pings/downloads/uploads etc, it seemed to be failing hard on DNS (UDP) stuff. My WiFi N USB adapter was basically dropping a LOT of packets whenever doing UDP lookups.. TCP stuff seemed to go through without issue. I haven't found the actual cause for this yet though. I have the RPi plugged in via ethernet while I do the texturecache.py run. Once its complete, Ill test with the RPi next to the router, over WiFi and see if that makes a difference.
The fact it only seemed to be dropping UDP stuff is what confuses me.