• 1
  • 173
  • 174
  • 175(current)
  • 176
  • 177
  • 197
[RELEASE] Texture Cache Maintenance utility
Trying to run texturecache on iOS 12 (jailbroken). Running Python 2.7.15. Getting this error:

python:
Traceback (most recent call last):
  File "texturecache.py", line 33, in <module>
    import os, sys, platform, re, datetime, time
ImportError: dynamic module does not define init function (initdatetime)

Any ideas?
Reply
(2019-03-12, 04:29)desepticon Wrote: Trying to run texturecache on iOS 12 (jailbroken). Running Python 2.7.15. Getting this error:

python:
Traceback (most recent call last):
  File "texturecache.py", line 33, in <module>
    import os, sys, platform, re, datetime, time
ImportError: dynamic module does not define init function (initdatetime)

Any ideas?

Looks like a platform issue, ie. problem with Python2 on iOS - not really anything I can help with I'm afraid. Best report it to whoever maintains Python2 for iOS.
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. Fat chance of saurik updating python anytime soon. In any case, I can run texturecache remotely from my Mac.
Reply
(2019-03-12, 05:12)desepticon Wrote: Thanks. Fat chance of saurik updating python anytime soon. In any case, I can run texturecache remotely from my Mac.

Running it remotely is IMHO the best option, that way you don't need to install anything on the client, and can control multiple clients with ease.
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
I have many movies in my database without posters or fanart. (Once upon a time I had the .jpgs alongside the video files, but I removed them, and now after re-installing my Kodi, my MySQL database still points to those local non-existing files.)

Is there a way to make Kodi rescrape those movies that have no posters and fanart? Or perhaps to remove those movies from the database, and newly scrape them afterwards?


I thought the qax option might do this, but that doesn't show any of those films. Perhaps because Kodi thinks it has art (because it points to a file), even though there is no art at that place. So now I'm lost. Any pointers?
Reply
You could use texturecache.py jd movies | mklocal.py --prefix=... --local=... --artwork poster fanart --no-keep to remove any local artwork that no longer exists.

Apply the changes against your library, then you can use something like Artwork Beef to find new artwork now that it is no longer present in your library, or texturecache.py qax movies @qa.art.movies=poster,fanart @qa.fail.checkexists=no to refresh movies with missing poster or fanart.
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
(2019-03-20, 18:37)Milhouse Wrote: You could use texturecache.py jd movies | mklocal.py --prefix=... --local=... --artwork poster fanart --no-keep to remove any local artwork that no longer exists.

Apply the changes against your library, then you can use something like Artwork Beef to find new artwork now that it is no longer present in your library, or texturecache.py qax movies @qa.art.movies=poster,fanart @qa.fail.checkexists=no to refresh movies with missing poster or fanart.
 Thanks, I'll look into it tomorrow!
Reply
Hey @Milhouse

I took an example from Post 2463 back on pg 165 and created a batch file to run on occasion. Things were running fine for a bit, but now seems to hang on the first vscan. I added the @Scan.showdialogs=yes you recommended for KODI 18, but get nothing to show. Here's my code below, did I forget something or throw a bad operation? (also, sleep gives me a message that it's not recognized). Any assistance would be great - or maybe I just need some serious patience.  Rofl 
Thanks in advance.

Code:
echo "Start Scanning Video Library vscan"
"C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe" texturecache.py vscan @Scan.showdialogs=yes
sleep 3
echo "Start Cleaning Video Library vclean"
"C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe" texturecache.py vclean @clean.showdialogs=yes
sleep 3
echo "Start Cleaning Video Library vclean"
"C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe" texturecache.py vclean @clean.showdialogs=yes
sleep 3
echo "Start Scanning Audio Library ascan"
"C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe" texturecache.py ascan @Scan.showdialogs=yes
sleep 3
echo "Start Cleaning Audio Library aclean"
"C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe" texturecache.py aclean @clean.showdialogs=yes
sleep 3
echo "Start Cleaning Audio Library aclean"
"C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe" texturecache.py aclean @clean.showdialogs=yes
sleep 3
echo "Start update with qax"
"C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe" texturecache.py qax
sleep 3
echo "Start scanning texturecache with function C"
"C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe" texturecache.py C
sleep 3
echo "Prune data missing on disk P"
"C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe" texturecache.py P
sleep 3
echo "Start update with Xd"
"C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe" texturecache.py Xd
sleep 3
echo "Start Reverse query cache update with R"
"C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe" texturecache.py R
sleep 3
echo "end"
Reply
(2019-03-27, 00:48)RonnieG3 Wrote: I added the @Scan.showdialogs=yes you recommended for KODI 18

Sorry, that should have been @Scan.showdialogs=yes (lowercase "s" on "scan") - the options are case sensitive, I may have originally typed that from a tablet which auto-corrected it. I'll update the original post.

Edit: Nope, the original post is correct - it's the forum that has matched @Scan with a forum member called Scan so it displays [at]scan.showdialogs as [at]Scan.showdialogs.

(2019-03-27, 00:48)RonnieG3 Wrote: also, sleep gives me a message that it's not recognized

The original post was for Linux - you'll need to use the Windows equivalent of sleep, something like timeout 3 >nul might work.
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 this wonderful script.

After a fresh installation of Leia, I was missing too many items from my library (posters, fanarts, etc.)
Then I read Milhouse's advice to use Artwork Beef to get all the missing artwork and then use texturecache.py C movies in order to re-download it in my thumbnails folder.
It worked!

But I'm having trouble with the actors thumbs.

I have edited the texturecache.cfg to include the following lines:
extrajson.movies  = cast
extrajson.tvshows.tvshow = cast
extrajson.tvshows.episode = cast
cache.castthumb = yes

 
The script correctly finds that I'm missing too many actors (with the nc option) but it cannot download them (with the C option).
It says something like cannot be downloaded from ia.media-imdb...

However if I use the Universal Movie Scraper for a movie everything is downloaded/scraped correctly.

Is there something I can do for the missing cast thumbnails ?
Reply
Sorry the question but the thread is very very big. Is there a way to cache only posters or only fanarts?
Reply
(2019-04-07, 11:56)Eisi2005 Wrote: Sorry the question but the thread is very very big. Is there a way to cache only posters or only fanarts?

To cache only posters AND fanart for movies:
text:

texturecache.py c movies @cache.artwork=poster,fanart
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
(2019-04-07, 10:20)mindnever Wrote: Is there something I can do for the missing cast thumbnails ?

No. Unfortunately Kodi is not always able to download remote artwork. The artwork may have been removed (in which case you need a new remote url), or the remote web site hosting the artwork may not allow mass scraping, so keep trying and it might work a bit later.

Rate limiting, ideally in Kodi as it's Kodi that performs the actual download from the remote site, or in the texturecache.py script might help - you could try downloading cast artwork using only a single download thread in texturecache.py with @Download.threads=1 (edit: that's download with a lowercase d - thank forum) and see if that helps. Or try @singlethread.urls=ia.media-imdb.com which limits the sequential download to the specified (comma-delimited) domains.

Not sure if Universal Movie Scraper actually downloads the artwork - it may just associate the movie with the actor url, then the artwork is downloaded the first time you view that actor thumbnail in the GUI (at a time when the remote site is allowing the reduced number of requests from Kodi).
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
(2019-04-07, 23:12)Milhouse Wrote:
(2019-04-07, 11:56)Eisi2005 Wrote: Sorry the question but the thread is very very big. Is there a way to cache only posters or only fanarts?

To cache only posters AND fanart for movies:
text:

texturecache.py c movies @cache.artwork=poster,fanart
 
Thanks !!
Reply
(2019-04-07, 23:24)Milhouse Wrote:
(2019-04-07, 10:20)mindnever Wrote: Is there something I can do for the missing cast thumbnails ?

No. Unfortunately Kodi is not always able to download remote artwork. The artwork may have been removed (in which case you need a new remote url), or the remote web site hosting the artwork may not allow mass scraping, so keep trying and it might work a bit later.

Rate limiting, ideally in Kodi as it's Kodi that performs the actual download from the remote site, or in the texturecache.py script might help - you could try downloading cast artwork using only a single download thread in texturecache.py with @Download.threads=1 (edit: that's download with a lowercase d - thank forum) and see if that helps. Or try @singlethread.urls=ia.media-imdb.com which limits the sequential download to the specified (comma-delimited) domains.

Not sure if Universal Movie Scraper actually downloads the artwork - it may just associate the movie with the actor url, then the artwork is downloaded the first time you view that actor thumbnail in the GUI (at a time when the remote site is allowing the reduced number of requests from Kodi). 
I will try the download.threads=1 option.
Although I did try to cache/download cast for a single movie (6-7 actors missing), without success...

Thanks again Milhouse, I really appreciate your work...
Reply
  • 1
  • 173
  • 174
  • 175(current)
  • 176
  • 177
  • 197

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