• 1
  • 159
  • 160
  • 161(current)
  • 162
  • 163
  • 197
[RELEASE] Texture Cache Maintenance utility
@Milhouse

I continue my mission to get a perfect TextureCache and after several hours the script finished scanning the full lib in one device and got below error
 The following items could not be downloaded:
[clearart  ] [Enemies Closer                          ] nfs://192.168.1.117/volume1/Movie_Belly/Movies 1970 to 2012/Enemies Closer/clearart.png
[landscape ] [What Happened to Monday                 ] https://assets.fanart.tv/fanart/movies/4...54a3c7.jpg
Can you please tell me how to fix these errors?

Issue with the first was "0" byte file (clearart.png) and I removed it from source and rerun the scanner just for that Movie (./texturecache.py C movies "Enemies Closer") but I am keep getting the same error over and over.

Then I tried below but nothing is showing. I am happy to remove this entry (nfs://192.168.1.117/volume1/Movie_Belly/Movies 1970 to 2012/Enemies Closer/clearart.png) and please help me with directions.
 ./texturecache.py Xd movies
Reply
(2018-03-21, 13:38)sniferx1 Wrote: I continue my mission to get a perfect TextureCache

You'll almost certainly never achieve your mission while using remote artwork, IMHO - there are too many factors outside of your control.

(2018-03-21, 13:38)sniferx1 Wrote: Issue with the first was "0" byte file (clearart.png) and I removed it from source and rerun the scanner just for that Movie (./texturecache.py C movies "Enemies Closer") but I am keep getting the same error over and over.
If you've removed the artwork, but the media library still references the artwork, then the script will continue to try and cache it (and fail).

You need to replace the artwork with a suitable non-zero byte file, or remove the clearart artwork from the movie so that it will no longer be cached.

To remove the artwork determine the movieid for the movie with ./texturecache.py jd movies "Enemies Closer" then the following will remove the clearart:
Code:
./texturecache.py set movie #### art.clearart ""
where #### is the movieid value for your movie.

(2018-03-21, 13:38)sniferx1 Wrote: [landscape ] [What Happened to Monday                 ] https://assets.fanart.tv/fanart/movies/4...54a3c7.jpg

This is the problem with remote artwork - the web sites don't always respond reliably, or predictably. It could be too many requests and you are being throttled (temporary issue, try again later), or the artwork has moved (terminal issue, you'll need to scrape alternative artwork), or just the day of the week.

If you try again for this movie then Kodi may be able to cache it a second time.
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 @Milhouse 

I am now updating the lib with IMDB data and getting below error for TVshows. For movies all available fields worked like a charm but not getting any luck for tvshows. I think this is with supported fields as when I but votes only in the .cfg it worked. (I already purchased the API key)

Cfg:
imdb.fields.movies = top250, title, rating, votes, year, runtime, genre, plot, plotoutline
imdb.fields.tvshows = votes, title, rating, year, runtime, genre, plot

Command:
./texturecache.py imdb tvshows | ./texturecache.py set

Error:T
raceback (most recent call last):  File "./texturecache.py", line 8618, in <module>    main(sys.argv[1:])  File "./texturecache.py", line 8527, in main    setDetails_batch(dryRun=dryRun)  File "./texturecache.py", line 6224, in setDetails_batch    jdata = json.loads("".join(data))  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads    return _default_decoder.decode(s)  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode    obj, end = self.raw_decode(s, idx=_w(s, 0).end())  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode    raise ValueError("No JSON object could be decoded")ValueError: No JSON object could be decoded 

Can you please let me know what are the supported fields for tvshows?


EDIT:
Commenting the "imdb.fields.tvshows" in the cfg and passing the values via "
@imdb.fields.tvshows" worked. I think small bug with the script to get the parameters via the .cfg file.

Working Command:./texturecache.py imdb tvshows | ./texturecache.py set @imdb.fields.tvshows=votes,title,rating,year,runtime,genre,plot,plotoutline
Reply
(2018-03-22, 00:42)sniferx1 Wrote: Working Command:./texturecache.py imdb tvshows | ./texturecache.py set @imdb.fields.movies=votes,title,rating,year,runtime,genre,plot,plotoutline
This is "working" because you're passing @imdb.fields.movies to the wrong command in the pipeline, where it is ignored. Since it is being ignored, the imdb tvshows command in the pipeline is using whatever imdb.fields.tvshows is configured in texturecache.cfg (and if there is nothing defined in texturecache.cfg then it will use the default rating, votes).

Your command should be:
Code:
./texturecache.py imdb tvshows @imdb.fields.tvshows=votes,title,rating,runtime,plot | ./texturecache.py set

(2018-03-22, 00:42)sniferx1 Wrote: Can you please let me know what are the supported fields for tvshows?

text:
votes, rating, title, runtime, plot

should work for tvshows.

The error you are getting is because year and genre are not supported when querying episodes (they are supported by movies, and supported by tvshows but imdb tvshows is really updating individual episodes where these fields are not supported), so JSON returns an error, which you are then piping through texturecache.py set, and the error is not valid JSON so set chokes.

When experiencing this type of error it helps if you break the pipeline down to see the error that is being produced.
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
(2018-03-22, 01:50)Milhouse Wrote:
(2018-03-22, 00:42)sniferx1 Wrote: Working Command:./texturecache.py imdb tvshows | ./texturecache.py set @imdb.fields.movies=votes,title,rating,year,runtime,genre,plot,plotoutline
This is "working" because you're passing @imdb.fields.movies to the wrong command in the pipeline, where it is ignored. Since it is being ignored, the imdb tvshows command in the pipeline is using whatever imdb.fields.tvshows is configured in texturecache.cfg (and if there is nothing defined in texturecache.cfg then it will use the default rating, votes).

Your command should be:
Code:
./texturecache.py imdb tvshows @imdb.fields.tvshows=votes,title,rating,runtime,plot | ./texturecache.py set
(2018-03-22, 00:42)sniferx1 Wrote: Can you please let me know what are the supported fields for tvshows?
text:
votes, rating, title, runtime, plot

should work for tvshows.

The error you are getting is because year and genre are not supported when querying episodes (they are supported by movies, and supported by tvshows but imdb tvshows is really updating individual episodes where these fields are not supported), so JSON returns an error, which you are then piping through texturecache.py set, and the error is not valid JSON so set chokes.

When experiencing this type of error it helps if you break the pipeline down to see the error that is being produced. 
 Thanks @Milhouse below worked like charm:
./texturecache.py imdb tvshows @imdb.fields.tvshows=votes,rating,title,runtime,plot | ./texturecache.py set
Reply
@Milhouse 

Want to pick your brain on something. Given I got 4x Kodi devices and all connecting to same media lib via SQL server. Can I scan all via Texture Cache tool to one of the box and then Copy the "Thumbnails" folder and "Textures13.db" to other devices.

This will save huge amount of time and want to check withy  you.
Reply
(2018-03-22, 03:13)sniferx1 Wrote: @Milhouse 

Want to pick your brain on something. Given I got 4x Kodi devices and all connecting to same media lib via SQL server. Can I scan all via Texture Cache tool to one of the box and then Copy the "Thumbnails" folder and "Textures13.db" to other devices.

This will save huge amount of time and want to check withy  you.

Yes, in theory, particularly if the clients are all the same spec (ie. all Raspberry Pi's, or all PCs). The problem is that the caching process creates thumbnails optimised for the client device - a high powered PC may create higher resolution images than would be ideal on a lower powered ARM device; a Raspberry Pi can't hardware decode progressive JPGs while a PC can in which case caching a progressive thumbnail on a PC and copying the Thumbnails folder (and database!) to a RPi will always result in the RPi software decoding the cached artwork.

So yes, it's possible, but there are caveats.

You may find guides that recommend using path substitution to "share" the Thumbnails folder but this usually fails to share the Textures13.db database, which can lead to odd and hard to reproduce caching/display issues. Sharing the database is not IMHO a good idea, as SQLite databases are not designed for simultaneous access from multiple network clients (that's what a database server is for, and unfortunately Textures13.db cannot be hosted on a MySQL server - there's really no point supporting MySQL as texture caching is an entirely client specific function).
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. I will give this a go. I got 3x Vero4K devices and 1x Rpi3. Hopefully this will work.
Reply
(2018-03-22, 04:39)sniferx1 Wrote: Thanks. I will give this a go. I got 3x Vero4K devices and 1x Rpi3. Hopefully this will work.
 I have copied them across to one Vero4K device to other Vero4K unfortunately post the reboot it didn't work. Anyway it's OK as I got a perfectly working one Vero4K Box now and just need to spend some time and get others running.

Thanks heap for your prompt support @Milhouse as I have learned so many new things for last few days. Those who like to know the copy command I used to copy them across it's as below....
 Copy between hosts via ZIP:tar cf - Thumbnails | ssh [email protected] tar xfC - ~/.kodi/userdatatar cf - Textures13.db | ssh [email protected] tar xfC - ~/.kodi/userdata/Database
Reply
Thumbs Up 
Awesome stuff Milhouse. Wish I had found this sooner. Kodi should come with a PSA pointing all comers to this thread.
Reply
Excellent script, exactly what I needed. All of this should really be part of the main product, thanks for your hard work.
Reply
Hi, thanks for this useful utility!

I'm curious, using the option "C", will this fetch,rebuild cache/images with the current settings for <imageres> and <fanartres> found in advancedsettings.xml in my Kodi's userdata folder?

I'm looking to "refresh" my thumbnails etc. with my current settings for fanart and image resolution.
This is how my advancedsettings.xml looks like:

<advancedsettings>
<videolibrary>
    <imageres>1080</imageres>
    <fanartres>1080</fanartres>
    <imagescalingalgorithm>lanczos</imagescalingalgorithm>
    <dateadded>0</dateadded>
    <recentlyaddeditems>35</recentlyaddeditems>
    <cleanonupdate>true</cleanonupdate>
</videolibrary>
</advancedsettings>
Reply
(2018-03-29, 00:10)DG77 Wrote: I'm curious, using the option "C", will this fetch,rebuild cache/images with the current settings for <imageres> and <fanartres> found in advancedsettings.xml in my Kodi's userdata folder?
Yes
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 need your expertise again as all of my Movie "Thumbs" via KODI Web Interface and Kodi APP displaying KODI generated Thumbs and not the Nice Poster version of the Thumbs. I tried to re-cache them via "C" but same Kodi generated Thum is displaying and you can see this via below image I have uploaded.

https://drive.google.com/file/d/17YyNnXm...sp=sharing

However if I refresh the Movie again from Kodi UI, then the proper version of the Thumb is displaying via WEB-UI and APP. 

How can I your your tool and refech the Thumbs? Also anyway to use your tool and perform full lib refresh in this case?
Reply
(2018-03-30, 01:16)sniferx1 Wrote: How can I your your tool and refech the Thumbs? Also anyway to use your tool and perform full lib refresh in this case?

The script is only caching what is in your media library.

Run texturecache.py jd movies Throwaways and paste the result.
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
  • 159
  • 160
  • 161(current)
  • 162
  • 163
  • 197

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