•   
  • 1
  • 114
  • 115
  • 116(current)
  • 117
  • 118
  • 179
  •   
[RELEASE] Texture Cache Maintenance utility
@Milhouse can you assist me in preparing a script to run the add-on, Rating Update in the background?

I am aware that the add-on provides an option to run the add-on as a service and on a schedule, but I'll have to change the setting every time I want to ran the add-on normally.

The script that I tried:
Code:
C:\Python\Python35-32\python.exe C:\Users\MarHutchy\Downloads\PROGRAMS\TextureCacheMaintenance\texturecache.py exec script.ratingupdate silent=true

It ran the add-on normally, instead of silently.
Reply
(2015-11-11, 00:40)Milhouse Wrote: Hmmm... this is odd... it's not immediately obvious why either should be reporting the file as missing, as based on the data the script is correctly determining the file name in both cases, which makes me suspect the subsequent directory access is failing for some reason.

Can you provide the log file when running qa for each of the two movies (ie. two log files) as I'd like to see the directory data kodi is returning when querying for the available files, as something must now be wrong here. Thanks.

Hello Milhouse, please find the logs here http://goo.gl/uMLF78 and there http://goo.gl/cvh1ev. Thank you very much, Justin
Reply
(2015-11-11, 22:29)Just-Me_A-User Wrote: Hello Milhouse, please find the logs here http://goo.gl/uMLF78 and there http://goo.gl/cvh1ev. Thank you very much, Justin

Many thanks.

After the stacking refactor in v2.2.1 a silly error on my part meant the script would always report the media file as missing even when qa.file=no.

Now fixed in v2.2.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.
Reply
Works like a charm, thank you very much! Justin
Reply
Hi Milhouse

Love the utility! Have used it a few times to remove old cached artwork that wasn't needed anymore.

However, I have a little problem at the moment. I reinstalled my Kodi box and reconnected it to my MySQL server. The database works OK, but several movies are now without posters or fanart. Through your utility I found they are linked to some fanart website that's no longer available. If I rescrape those movies, new fanart shows up, and it's all OK. But there are like 700 of them, so that would take me a week to manually reload those movies. The alternative would be reloading ALL movies, but I'm afraid my will be scraped wrong (I had to correct several when I imported them). So I guess this is a scenario where your tool would be helpful.


Can your utility remove (and possible reload) movies from the database, but only those that are without a downloadable fanart and/or poster?


When I use "./texturecache.py c" the relevant movies are all shown ("The following items could not be downloaded"), but I don't know how to get further from there.
Reply
(2015-11-12, 15:28)willemd Wrote: Can your utility remove (and possible reload) movies from the database, but only those that are without a downloadable fanart and/or poster?

You could use the mklocal.py script with the --nokeep option.

The mklocal.py script will download any remote artwork and store the original quality images alongside your movies. When using the --nokeep option any remote (or local) artwork that no longer exists or is not accessible will be removed from your media library so that an addon such as Artwork Downloader can find an alternative (you can then repeat mklocal.py to convert any new remote artwork to local etc.).

See here for an overview.

Run "mklocal.py --help" for a description of each option - if you have all of your movies in single folders you may also want to specify the --singlefolders option.
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
(2015-11-11, 19:14)marhutchy Wrote: @Milhouse can you assist me in preparing a script to run the add-on, Rating Update in the background?

I am aware that the add-on provides an option to run the add-on as a service and on a schedule, but I'll have to change the setting every time I want to ran the add-on normally.

The script that I tried:
Code:
C:\Python\Python35-32\python.exe C:\Users\MarHutchy\Downloads\PROGRAMS\TextureCacheMaintenance\texturecache.py exec script.ratingupdate silent=true

It ran the add-on normally, instead of silently.
Reply
(2015-11-11, 19:14)marhutchy Wrote: @Milhouse can you assist me in preparing a script to run the add-on, Rating Update in the background?

I am aware that the add-on provides an option to run the add-on as a service and on a schedule, but I'll have to change the setting every time I want to ran the add-on normally.

The script that I tried:
Code:
C:\Python\Python35-32\python.exe C:\Users\MarHutchy\Downloads\PROGRAMS\TextureCacheMaintenance\texturecache.py exec script.ratingupdate silent=true

It ran the add-on normally, instead of silently.

The script.ratingupdate addon doesn't support a "silent" run-time argument so passing "silent=true" to this particular script is meaningless. Every script will support different run-time arguments, including none at all, so you need to look at the script documentation and/or source code to understand what arguments are supported.

In the case of script.ratingupdate it only appears to support one argument "Single=Movie"/"Single="TVShow", otherwise it runs according to the configured settings (top250, movies, and/or tvshows).
You'll need to contact the add-on author for help adding the features you require.

But you do realise you can use texturecache.py to update Top250, ratings and votes plus various other configurable fields (eg. plot, outline, runtime, year, genre)?
Code:
texturecache.py imdb movies | texturecache.py set
texturecache.py imdb tvshows | texturecache.py set
See imdb tvshows announcement for further details.
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
(2015-11-13, 01:33)Milhouse Wrote:
(2015-11-11, 19:14)marhutchy Wrote: @Milhouse can you assist me in preparing a script to run the add-on, Rating Update in the background?

I am aware that the add-on provides an option to run the add-on as a service and on a schedule, but I'll have to change the setting every time I want to ran the add-on normally.

The script that I tried:
Code:
C:\Python\Python35-32\python.exe C:\Users\MarHutchy\Downloads\PROGRAMS\TextureCacheMaintenance\texturecache.py exec script.ratingupdate silent=true

It ran the add-on normally, instead of silently.

The script.ratingupdate addon doesn't support a "silent" run-time argument so passing "silent=true" to this particular script is meaningless. Every script will support different run-time arguments, including none at all, so you need to look at the script documentation and/or source code to understand what arguments are supported.

In the case of script.ratingupdate it only appears to support one argument "Single=Movie"/"Single="TVShow", otherwise it runs according to the configured settings (top250, movies, and/or tvshows).
You'll need to contact the add-on author for help adding the features you require.

But you do realise you can use texturecache.py to update Top250, ratings and votes plus various other configurable fields (eg. plot, outline, runtime, year, genre)?
Code:
texturecache.py imdb movies | texturecache.py set
texturecache.py imdb tvshows | texturecache.py set
See imdb tvshows announcement for further details.

Okay.

When I was using Rating Update add-on I had to search for some of the TV series so a to get the correct ID.

I read the link that you provided, but I have a question: each of my series has it's respective nfo with it's IMDB ID, does Kodi have that stored in my library? If yes, can't the utility jut use the ID?

My attempt:
Code:
texturecache.py imdb tvshows  | imdb.translate.tvtitles = ^Fate/Stay Night= | imdb.translate.tvyears = ^Baby Steps=2014 | texturecache.py set

I have a feeling this will be a problem.[/code]

I added these to my config file:
Code:
imdb.fields = votes, rating, top250
imdb.fields.tvshows = votes, rating, top250 (yes, there's a top 250 for TV shows now :))

Also, the code that you provided, will I have to have 2 batch files, one that I run after the other is finished?
Or can I put both in the same batch file?
Reply
(2015-11-13, 20:28)marhutchy Wrote: I read the link that you provided, but I have a question: each of my series has it's respective nfo with it's IMDB ID, does Kodi have that stored in my library? If yes, can't the utility jut use the ID?

Kodi has no support for the IMDB id where TV Shows are concerned, only movies, so the IMDB id in your TV Show NFOs would have been ignored (yes I know I still reference the old field name, will change that in due course)

(2015-11-13, 20:28)marhutchy Wrote: My attempt:
Code:
texturecache.py imdb tvshows  | imdb.translate.tvtitles = ^Fate/Stay Night= | imdb.translate.tvyears = ^Baby Steps=2014 | texturecache.py set

The translation examples given in the announcement are examples that would be added to texturecache.cfg.

If however you want to include them on the command line, then prefix with @ and include double-quotes around the values to avoid spaces becoming an issue:

Code:
texturecache.py imdb tvshows @imdb.translate.tvtitles="^Fate/Stay Night=" @imdb.translate.tvyears="^Baby Steps=2014" | texturecache.py set

Adding them to the config file is much easier. Smile

If you don't get the results you expect then enable a logfile (with "@logfile=tc.log") then look at the log file to hopefully understand what is going on or not working.

(2015-11-13, 20:28)marhutchy Wrote: I added these to my config file:
Code:
imdb.fields = votes, rating, top250
imdb.fields.tvshows = votes, rating, top250 (yes, there's a top 250 for TV shows now :))

Although there may now be a Top250 listing available for TV Shows, there is currently no Top250 TV Show support in this script as Kodi itself has no TV Show support for the top250 field (as there is no where in the Kodi database to store the top250 value against each TV Show), in which case trying to collect this information right now is pointless and a waste of time.

Edit: Also note that it's now "imdb.fields.movies" not "imdb.fields" - the name of this field changed with the addition of tvshows support (yes I know the documentation - such as it is - may have implied otherwise but that's mostly corrected now, so you now have two fields to control what is queried/updated: imdb.fields.movies and imdb.fields.tvshows).

(2015-11-13, 20:28)marhutchy Wrote: Also, the code that you provided, will I have to have 2 batch files, one that I run after the other is finished?
Or can I put both in the same batch file?

You can put them both in the same batch file, they'll run sequentially. Please try not to run the imdb part of the script more than once a day for each of movies and tvshows to avoid spamming omdbapi.com - the data doesn't update any more often than that.
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
(2015-11-14, 02:44)Milhouse Wrote:
(2015-11-13, 20:28)marhutchy Wrote: Also, the code that you provided, will I have to have 2 batch files, one that I run after the other is finished?
Or can I put both in the same batch file?

You can put them both in the same batch file, they'll run sequentially. Please try not to run the imdb part of the script more than once a day for each of movies and tvshows to avoid spamming omdbapi.com - the data doesn't update any more often than that.
@Milhouse
can you make a example for a windows-batch-file where more then on command is in use please?

Sorry I have a lot of questions where I cant find an answers.
Where I can use the sep = | in the texturecache.cfg? For what's that seperator?
When I have a texturecache.cfg in the same folder as texturecache.py - have I use it in the command string like e.g. "texturecache.py C movies @config=texturecache.cfg" or can I omitting "@config=texturecache.cfg"?

I have scraped my movies and TVshows with EmberMediamanager and not with kodi. So all needed files e.g. movie.nfo, movie-fanart.jpg, movie-clearlogo.png ... are local in every movie folder. The Thumbnails-Folder is substitute to my server. This folder blow up more and more. Now I want to synch mysql-kodi-db and every local Textures13.db with the movie files. I do not want that texturecache.py download informationen from the WAN and save this in the different db's or in the .nfo-file. Do I need a special parameter that texturecache.py read/use only the local files or informations? Does texturecache.py synch the extra-arts and special-arts like extrathumb.jpg or clearlogo.png too?

I do not understand the principle/expiration of texturecache.py.
Does the script look first in the kodi.db (mysql-db), find the path to a movie, synch then textures13.db
or
does the script look in the movie sources first then add/synch the informations in kodi.db then synch textures13.db?

Hope you understand my bad English.
Thanks.
Reply
(2015-11-18, 00:10)Nepomuk Wrote: can you make a example for a windows-batch-file where more then on command is in use please?

It's just a text file, one command on each line...

Code:
@echo off
c:\texturecache.py c movies
c:\texturecache.py c tvshows
c:\texturecache.py imdb movies | c:\texturecache.py set
c:\texturecache.py imdb tvshows | c:\texturecache.py set

would work, assuming you have texturecache.py and (if needed) texturecache.cfg in c:\, and the python path is added to your PATH variable (see guide for Windows users).

(2015-11-18, 00:10)Nepomuk Wrote: Where I can use the sep = | in the texturecache.cfg? For what's that seperator?

I have tried to persuade people *NOT* to use values in their texturecache.cfg that they don't need (because they're the same as the default value), or understand. I've provided a sample file on github, which was probably a mistake, and it's not intended that you use it verbatim/as-is - most people don't need a configuration file at all.

Regarding the sep field, it's the separator between fields in the output from the "s" option, eg.:
Code:
./texturecache.py s avatar @sep=#
014301#f/f6fd12f4.png#0562#1000#0002#2015-07-10 03:27:49#2015-07-10 04:27:48#nfs://192.168.0.3/mnt/share/media/Video/MoviesSD/Avatar (2009)[DVDRip]-clearart.png
014829#0/05ae89b1.png#0310#0800#0002#2015-07-10 03:31:25#2015-07-10 04:31:10#nfs://192.168.0.3/mnt/share/media/Video/MoviesSD/Avatar (2009)[DVDRip]-logo.png
015466#d/d843551b.jpg#0000#0000#0294#2015-09-13 22:27:39#2015-09-13 23:27:01#nfs://192.168.0.3/mnt/share/media/Video/MoviesSD/Avatar (2009)[DVDRip]-fanart.jpg
016161#c/cfdfd21f.jpg#0000#0000#0329#2015-10-26 08:23:13#2015-10-25 23:27:09#nfs://192.168.0.3/mnt/share/media/Video/MoviesSD/Avatar (2009)[DVDRip]-poster.jpg
Matching row ids: 14301 14829 15466 16161

I very much doubt there's any reason to change the value of sep, but the option is there...

(2015-11-18, 00:10)Nepomuk Wrote: When I have a texturecache.cfg in the same folder as texturecache.py - have I use it in the command string like e.g. "texturecache.py C movies @config=texturecache.cfg" or can I omitting "@config=texturecache.cfg"?

No, it will be used automatically. If you use the "config" option it will display the name and path of the texturecache.cfg being used:
Code:
~/projects$ ./texturecache.py/texturecache.py config
Current properties (if exists, read from /home/neil/projects/texturecache.py/texturecache.cfg):
...

The @config property is only needed when the configuration file is not found in one of the default locations, or is not using the default name (texturecache.cfg).

(2015-11-18, 00:10)Nepomuk Wrote: I have scraped my movies and TVshows with EmberMediamanager and not with kodi. So all needed files e.g. movie.nfo, movie-fanart.jpg, movie-clearlogo.png ... are local in every movie folder. The Thumbnails-Folder is substitute to my server. This folder blow up more and more. Now I want to synch mysql-kodi-db and every local Textures13.db with the movie files.

Path substitution of the Thumbnails folder when shared between multiple clients is explained quite clearly in the Kodi Wki (see contents of the orange box) as being an unsupported option, and one that doesn't work. Just stop using it, and use local Thumbnails folders on each client or provide each client with their own network folder, but whatever you do, do not share Thumbnails folders.

(2015-11-18, 00:10)Nepomuk Wrote: I do not want that texturecache.py download informationen from the WAN and save this in the different db's or in the .nfo-file. Do I need a special parameter that texturecache.py read/use only the local files or informations?

If you don't want the script to cache remote artwork (ie. artwork where the path begins with http) then add the following to your texturecache.cfg:
Code:
cache.ignore.types=+^http

and this will add (hence the +) the ^http pattern to the existing ignored "types" (the default value is " ^video, ^music", which ignores embedded video and music artwork, as these can't be cached by this script).

(2015-11-18, 00:10)Nepomuk Wrote: Does texturecache.py synch the extra-arts and special-arts like extrathumb.jpg or clearlogo.png too?

Yes, "extra-arts" will be cached if you add the following to texturecache.cfg:
Code:
cache.extrafanart = yes
cache.extrathumbs = yes

Also, VideoExtras is supported:
Code:
cache.videoextras = yes

The default for all of the above settings is "no".

"special-arts" (clearlogo.png etc.) will be cached automatically, as will any artwork type referenced by your media library, eg. discart, clearart etc.

Use "cache.artwork" to cache specific artwork, eg. "cache.artwork=poster,fanart" would cache only poster and fanart - the default is to cache all artwork referenced by the media library.

Note that extrafanart/extrathumbs/videoextras artwork is not referenced by the media library, hence the separate options to enable this functionality (which is barely tested, by the way, as I doubt anyone has used it until now...).

(2015-11-18, 00:10)Nepomuk Wrote: I do not understand the principle/expiration of texturecache.py.
Does the script look first in the kodi.db (mysql-db), find the path to a movie, synch then textures13.db
or
does the script look in the movie sources first then add/synch the informations in kodi.db then synch textures13.db?

The former - the script compares the artwork paths from the media library against the artwork paths from the texture cache, and caches whatever is missing. In the case of extrafanart/extrathumbs/videoextras artwork, the script scans the directories for the relevant artwork (and then compares against the texture cache).
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
Is this utility so complicated for gentiles like us to use, execute and benefit from it? I see a simple gui based utility on youtube with similar name, is this the same ?

https://www.youtube.com/watch?v=aHDlXYV9EG4
Reply
(2015-11-18, 02:35)MANswers Wrote: Is this utility so complicated for gentiles like us to use, execute and benefit from it?

It does a lot, but it's not particularly complicated to use - you can be up and running in a few seconds (a little longer on Windows) if you follow the installation instructions.

At the end of the day it's a command line tool - if you understand what that is, you should be able to use this script. If not, you can choose to learn, or find something else that has a GUI.

(2015-11-18, 02:35)MANswers Wrote: I see a simple gui based utility on youtube with similar name, is this the same ?

Nope, that add-on is as dumb as a box of frogs, and as a bonus it will push "news" to your box. If all you want to do is nuke your entire texture cache - so that _every_ item of artwork needs to be re-cached as you browse the GUI - then sure, use that add-on, provided you're happy to accept the overhead of running something so ridiculously simple "as a service" (ie. it's running all the time).

If however you want to manage your cache a little more intelligently, the script in this thread is (IMHO) your best option, particularly if you're comfortable with a command line - if not, there's another add-on that offers to clean thumbnails (this add-on is not related to this script).
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
(2015-11-18, 02:57)Milhouse Wrote:
(2015-11-18, 02:35)MANswers Wrote: Is this utility so complicated for gentiles like us to use, execute and benefit from it?

It does a lot, but it's not particularly complicated to use - you can be up and running in a few seconds (a little longer on Windows) if you follow the installation instructions.

At the end of the day it's a command line tool - if you understand what that is, you should be able to use this script. If not, you can choose to learn, or find something else that has a GUI.

(2015-11-18, 02:35)MANswers Wrote: I see a simple gui based utility on youtube with similar name, is this the same ?

Nope, that add-on is as dumb as a box of frogs, and as a bonus it will push "news" to your box. If all you want to do is nuke your entire texture cache - so that _every_ item of artwork needs to be re-cached as you browse the GUI - then sure, use that add-on, provided you're happy to accept the overhead of running something so ridiculously simple "as a service" (ie. it's running all the time).

If however you want to manage your cache a little more intelligently, the script in this thread is (IMHO) your best option, particularly if you're comfortable with a command line - if not, there's another add-on that offers to clean thumbnails (this add-on is not related to this script).

Your reply was very informative and tempting me to definately use this.
By the way, can i ask a very basic stupid question, whats the point of cleaning your thumbnails? what thumbnails? why use this utility, how does it benifit

I will start reading on how to install it now. Cos i know it definately does something good, and tons of ppl on here use it... so i am definately missing out something if i am not using and so many are.
Reply
  •   
  • 1
  • 114
  • 115
  • 116(current)
  • 117
  • 118
  • 179
  •   
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average



Logout Mark Read Team Forum Stats Members Help
[RELEASE] Texture Cache Maintenance utility4.7617