• 1
  • 147
  • 148
  • 149(current)
  • 150
  • 151
  • 197
[RELEASE] Texture Cache Maintenance utility
Also, in addition to the logfile, could you run "texturecache.py jd tvshows >/tmp/tvshows.dat" and then upload /tmp/tvshows.dat somewhere (may require zipping etc.) and paste the link. 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
@Milhouse :

I tried under Windows, and this is the exact same behaviour. So it's not platform related.

In the tvshows.dat files generated, I can see "thumb": "image://http://thetvdb.com/banners/episodes/76648/205760.jpg/" but the corresponding file in the prune log is "thumb":"image://http%3a%2f%2fthetvdb.com%2fbanners%2fepisodes%2f76648%2f205760.jpg/".

Can it be the source of the problem ?

Anyway, you'll find the Windows logs here : http://dl.free.fr/er5r7dHEo

Thanks.

Smeulf
Reply
Milhouse,

It seems your commit "Handle seasons without episodes, fixes #44" is the source of the problem.

I removed the 2 lines of that commit here, and it seems it's working as expected again.

I let you check and confirm Wink

If you need more logs or test from me, just let me know.

All the best.

Smeulf.
Reply
@Smeulf thanks for that. I've pushed a fix (v2.3.9) - it was a bug introduced by this fix, as it should have been "episodes" not "episode".
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
Thumbs Up 
(2017-05-07, 20:22)Milhouse Wrote: @Smeulf thanks for that. I've pushed a fix (v2.3.9) - it was a bug introduced by this fix, as it should have been "episodes" not "episode".

Fix confirmed!

Many thanks Big Grin
Reply
(2017-05-06, 21:32)Milhouse Wrote: Regarding your first post, is your OSMC server using IP address 10.0.1.120? You'd only get that error if there is no JSON-RPC service listening on that IP address - if you've enabled this in Kodi (reboot for good measure, it might not always start when first enabled in the GUI) then double check you're using the correct IP address.

The error in your second post follows on the from the comment above... if you're sure kodi doesn't have a password configured in the GUI then double check you're connecting to the Kodi webserver on the correct IP address - you might be connecting to a different webserver entirely.

Thank you @Milhouse for your reply,

OSMC server is using 10.0.1.120 IP address indeed.
I got it 'working' by adding this in *.cfg file

Code:
webserver.port = 8080
webserver.username = osmc
webserver.password = osmc
So my .cfg file looks like this now:

Code:
webserver.port = 8080
webserver.username = osmc
webserver.password = osmc
# set a default section
section=server
cache.ignore.types=+^special://thumbnails
[server]
kodi.host=10.0.1.120
cache.ignore.types=+.*/animatedgifs/.*.gif$
#[bedroom]
#kodi.host=10.0.1.122
#cache.ignore.types=+.*/animatedgifs/.*.gif$
[TVroom]
kodi.host=10.0.1.121
# We want to ignore the animated GIFs made by Aeon MQ 7 skin

But now my client [TVroom] with IP address 10.0.1.121 doesn't have any of the posters or fanarts, none at all, but it does have the movie titles.
Is it because of this line in the *cfg file? :

Code:
cache.ignore.types=+^special://thumbnails

Thank you.
Reply
Perhaps OSMC uses different defaults to stock Kodi, as the default webserver port should be 8080, with no username/password.

(2017-05-07, 22:42)Simorgh Wrote: Is it because of this line in the *cfg file? :

Code:
cache.ignore.types=+^special://thumbnails

Thank you.

I can't imagine that having any effect so you might as well remove it.

Edit: Ah, it might have an effect if your only source of artwork is a location within special://thumbnails, such as the animated artwork that dumps it's GIFs inside the cache. So yes, if you want to load those GIFs you don't want to ignore the entire cache folder. Locating those GIFs elsewhere is the only sane solution.

I'm assuming your TVroom client is using the same MyVideos database as your other clients?

Can you run:
Code:
texturecache.py @section=TVroom @logfile=/tmp/tc.log nc tvshows
then upload /tmp/tc.log somewhere (zip if necessary).
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
Hello --

I've recently decided that it's not a good thing to have two thirds of my library not scraped properly by kodi for various reasons. In order to figure out what's missing in the library, I've been running these tasks in a daily (well, nightly) crontab:

Code:
./texturecache.py vclean
./texturecache.py vscan
./texturecache.py missing tvshows "TV_Shows"
./texturecache.py missing movies "Movies"

to help me review what's missing, so I can clean up the library.

I've got a few issues, not all of which may be related to texturecache.

On running the "missing" function, texturecache flashes these 'Loading TV show: xyz, season 8...' type of messages. When called from cron, it seems like these messages all go into the cron email, clogging up the actually wanted output of the script (the list with missing files). Is there a way to force texturecache to a terse output mode where this is just not printed to the console?

Then texturecache outputs these lines:
Code:
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_0.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_1.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_2.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_3.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_4.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_5.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_6.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_02_0.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_02_1.VOB

The corresponding movie has been properly scanned an is in kodi's database. Texturecache seems to do this for all scanned DVD's. Is there a way for me to fix this, so that these lines drop?

Lastly, I seem to have trouble generating nfo files for Movies that cannot be found by the scraper. Rather unrelated to texturecache, but if there's a good command line program to generate simple nfo's that kodi will scan, I'd love to hear about that.
Reply
(2017-05-07, 23:07)Milhouse Wrote: Perhaps OSMC uses different defaults to stock Kodi, as the default webserver port should be 8080, with no username/password.

(2017-05-07, 22:42)Simorgh Wrote: Is it because of this line in the *cfg file? :

Code:
cache.ignore.types=+^special://thumbnails

Thank you.

I can't imagine that having any effect so you might as well remove it.

Edit: Ah, it might have an effect if your only source of artwork is a location within special://thumbnails, such as the animated artwork that dumps it's GIFs inside the cache. So yes, if you want to load those GIFs you don't want to ignore the entire cache folder. Locating those GIFs elsewhere is the only sane solution.

I'm assuming your TVroom client is using the same MyVideos database as your other clients?

Can you run:
Code:
texturecache.py @section=TVroom @logfile=/tmp/tc.log nc tvshows
then upload /tmp/tc.log somewhere (zip if necessary).

https://www.dropbox.com/s/95wog8bwm0uytc3/tc.log?dl=0

Thank you.
Reply
(2017-05-08, 13:47)johnnychicago Wrote: On running the "missing" function, texturecache flashes these 'Loading TV show: xyz, season 8...' type of messages. When called from cron, it seems like these messages all go into the cron email, clogging up the actually wanted output of the script (the list with missing files). Is there a way to force texturecache to a terse output mode where this is just not printed to the console?

Anything you don't want to go into the cron email you need to redirect to /dev/null. The "Loading TV show" messages are being output to stderr (file handle 2) so add "2>/dev/null" to the end of your cron commands.

(2017-05-08, 13:47)johnnychicago Wrote: Then texturecache outputs these lines:
Code:
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_0.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_1.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_2.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_3.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_4.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_5.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_01_6.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_02_0.VOB
nfs://192.168.4.14//mnt/tank/media/video/Movies/Back In Trouble (1997)/VIDEO_TS/VTS_02_1.VOB

The corresponding movie has been properly scanned an is in kodi's database. Texturecache seems to do this for all scanned DVD's. Is there a way for me to fix this, so that these lines drop?

Yes, the "missing" option needs to be a bit smarter with DVD folders. For now you could just ignore these files by piping the output through "grep -v "/VIDEO_TS/""

(2017-05-08, 13:47)johnnychicago Wrote: Lastly, I seem to have trouble generating nfo files for Movies that cannot be found by the scraper. Rather unrelated to texturecache, but if there's a good command line program to generate simple nfo's that kodi will scan, I'd love to hear about that.

I'm not aware of one, sorry.
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
(2017-05-08, 16:52)Simorgh Wrote: https://www.dropbox.com/s/95wog8bwm0uytc3/tc.log?dl=0

Thank you.

Thanks, although it looks correct.

You have some posters already in your cache, but not fanart. For example, Westworld/poster.jpg is in your cache:
Code:
{u'cachedurl': u'1/1baf5e73.jpg', u'url': u'smb://SIMORGHOSMC/Sohrab15/TV Showz 15/Westworld/poster.jpg', u'textureid': 3103}
but Westworld/fanart.jpg is not, so the script wants to cache your fanart:
Code:
Need to cache: [  fanart  ] for tvshow: Westworld, Season 1
This is correct.

It's the same with your Westworld thumbs, as they're not present in your cache.

If you run "texturecache.py @logfile=/tmp/tc.log c tvshows westworld" then these items (fanart and thumbs) should be cached. If not, please send me the logfile.

A lot of the items in your cache are located on your 10.0.1.20 server - it seems at one point you accessed smb using IP address then switched your library to using the SIMORGHOSMC hostname. Consequently artwork cached using the IP address will now need to be re-cached using the hostname.

For example, X-Files. This is what you have in your library for X-Files tvshow banner, poster and fanart:
Code:
{
    "art": {
      "banner": "image://smb://SIMORGHOSMC/Sohrab15/TV Showz 15/The X-Files/banner.jpg/",
      "fanart": "image://smb://SIMORGHOSMC/Sohrab15/TV Showz 15/The X-Files/fanart.jpg/",
      "poster": "image://smb://SIMORGHOSMC/Sohrab15/TV Showz 15/The X-Files/poster.jpg/"
    },
while this is what you have in your cache on your 10.0.1.122 client:
Code:
{u'cachedurl': u'2/246b7f74.jpg', u'url': u'smb://10.0.1.120:445/Sohrab15/TV Showz 15/The X-Files/fanart.jpg', u'textureid': 2793}
{u'cachedurl': u'3/33f7f870.jpg', u'url': u'smb://10.0.1.120:445/Sohrab15/TV Showz 15/The X-Files/poster.jpg', u'textureid': 1371}
Consequently, your X-Files tvshow fanart/poster/banner etc. need to be cached:
Code:
Need to cache: [  fanart  ] for tvshow: The X-Files
Need to cache: [  poster  ] for tvshow: The X-Files
Need to cache: [  banner  ] for tvshow: The X-Files
Again this looks normal - if the artwork isn't correctly cached for X-Files please send a logfile.
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
(2017-05-08, 21:34)Milhouse Wrote:
(2017-05-08, 13:47)johnnychicago Wrote: On running the "missing" function, texturecache flashes these 'Loading TV show: xyz, season 8...' type of messages. When called from cron, it seems like these messages all go into the cron email, clogging up the actually wanted output of the script (the list with missing files). Is there a way to force texturecache to a terse output mode where this is just not printed to the console?

Anything you don't want to go into the cron email you need to redirect to /dev/null. The "Loading TV show" messages are being output to stderr (file handle 2) so add "2>/dev/null" to the end of your cron commands.

Ah - I could've thought of that. Thanks.

Quote:Yes, the "missing" option needs to be a bit smarter with DVD folders. For now you could just ignore these files by piping the output through "grep -v "/VIDEO_TS/""

That's precisely what I've been doing. Good to hear that it's a quirk of the tool, not something missing in my setup.
Quote:
(2017-05-08, 13:47)johnnychicago Wrote: Lastly, I seem to have trouble generating nfo files for Movies that cannot be found by the scraper. Rather unrelated to texturecache, but if there's a good command line program to generate simple nfo's that kodi will scan, I'd love to hear about that.

I'm not aware of one, sorry.

I've just found http://nfo-maker.com/, which serves for the odd file here or there. Still looking for something more competent, there's a few hundred lines in my cron email Smile Just realized as well that once one adds an nfo file, one has to touch the move file to make vscan pick it up the next time.

Anyway - thanks a lot for the tool, and for your help.
Reply
(2017-05-09, 08:57)johnnychicago Wrote: Just realized as well that once one adds an nfo file, one has to touch the move file to make vscan pick it up the next time.

Yes, that might be the case if the movie isn't already in the library.

However if you're adding (or updating) an NFO for an existing movie that has already been scanned into your library, then you shouldn't need to touch the movie file - something like "texturecache.py qax movies @qaperiod=-1 @qa.nfo.refresh=0" should automatically refresh (delete/rescan) any movie where the NFO file has been modified since midnight of the current day.
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
(2017-05-08, 22:11)Milhouse Wrote: Again this looks normal - if the artwork isn't correctly cached for X-Files please send a logfile.

Thank you @Milhouse for your last response. I will look into it further and see what I can do.

Appreciated.
Reply
Hi @Milhouse,

On a RPi1, I sometimes get that error, resulting in the script to hang.

Code:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
  File "./texturecache.py", line 1097, in run
    if not self.loadImage(item) and not item.missingOK:
  File "./texturecache.py", line 1177, in loadImage
    (url, rowexists) = self.geturl(item)
  File "./texturecache.py", line 1116, in geturl
    url = self.json.getDownloadURL(item.filename)
  File "./texturecache.py", line 2759, in getDownloadURL
    data = self.sendJSON(REQUEST, "preparedl")
  File "./texturecache.py", line 2220, in sendJSON
    return self.sendWeb("POST", "/jsonrpc", id, request, {"Content-Type": "application/json"}, timeout=timeout)
  File "./texturecache.py", line 2154, in sendWeb
    web.request(request_type, url, sdata, headers)
  File "/usr/lib/python2.7/httplib.py", line 1042, in request
  File "/usr/lib/python2.7/httplib.py", line 1082, in _send_request
  File "/usr/lib/python2.7/httplib.py", line 1038, in endheaders
  File "/usr/lib/python2.7/httplib.py", line 882, in _send_output
  File "/usr/lib/python2.7/httplib.py", line 844, in send
  File "/usr/lib/python2.7/httplib.py", line 821, in connect
  File "/usr/lib/python2.7/socket.py", line 575, in create_connection
error: [Errno 111] Connection refused

Is there a way to protect the code for this error ?

Thanks !

Smeulf.
Reply
  • 1
  • 147
  • 148
  • 149(current)
  • 150
  • 151
  • 197

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