Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 189
  • 190
  • 191(current)
  • 192
  • 193
  • 197
[RELEASE] Texture Cache Maintenance utility
(2020-06-17, 19:50)Milhouse Wrote:
(2020-06-17, 12:45)Mychale Wrote:  
How are you running the script? 
I just installed Python 3.8.3 in the normal setup process, I didn't change anything.  It's installed in the location: C:\Users\username\AppData\Local\Programs\Python\Python38.  I also added a PYTHONPATH environment variable to the same location as directed in the instructions from the first or so posts.  I then downloaded the Texture Cache zip file from Github, and extracted that to:  C:\TextureCache\   Then, I opened a CMD window as administrator (just in case) and changed to that folder, typed Texturecache.py and pressed enter.   

I use to run this script all the time, but when my HD crashed out several months ago, I had been slacking getting this up and going again.  It's been several years since I've set this up, so I know I did something wrong, I can feel it.

Thanks for your quick replies and as always, Awesome help.

Mychale
Reply
(2020-06-19, 06:40)Mychale Wrote: Thanks for your quick replies and as always, Awesome help.

Mychale

Hmmm... I installed Python3.8.3 on Windows 7, extracted the script from the zip and it worked as expected.

Does python C:\TextureCache\texturecache.py work?

If not, what happens if you just run "python" in CMD - what do you see?
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
(2020-06-19, 07:44)Milhouse Wrote:
(2020-06-19, 06:40)Mychale Wrote:  
Does python C:\TextureCache\texturecache.py work?

If not, what happens if you just run "python" in CMD - what do you see?
Here is my results:

C:\>python C:\TextureCache\texturecache.py
'python' is not recognized as an internal or external command,
operable program or batch file.

C:\>python
'python' is not recognized as an internal or external command,
operable program or batch file.

Seems like either Python is NOT installed correctly, or the PYTHONPATH variable is not working correctly. 
I just checked the environment path again and it shows the correct path I assume, but again I am assuming. 
The installation folder is:  C:\Users\username\AppData\Local\Programs\Python\Python38  and in this folder is both python.exe AND pythonw.exe  and that is the same path I used (just checked again)

When I do this:
C:\>cd texturecache

C:\TextureCache>texturecache.py
Requested Python version () is not installed

That was the original error message I get.  I'm so confused now.

Sorry for all the python questions and thanks again for your help.

Mychale
Reply
Ah, this is Windows which insists on those silly file extensions... (doh)! Can you try python.exe in place of python, so try python.exe C:\TextureCache\texturecache.py etc.
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
Googling for the error "Requested Python version () is not installed" returns posts that suggest Python has not been installed correctly so I would suggest removing then reinstalling Python38. I'm pretty certain this is not a script issue but that something is wrong with your Python installation, perhaps you installed it as one user and are now trying to run it as a different user? Maybe try (re)installing Python38 so that it's available for all users (there's a checkbox for this option during the installation)? Also make sure you're installing the correct 32/64 bit version.
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
(2020-06-19, 09:22)Milhouse Wrote: Googling for the error "Requested Python version () is not installed" returns posts that suggest Python has not been installed correctly so I would suggest removing then reinstalling Python38. I'm pretty certain this is not a script issue but that something is wrong with your Python installation, perhaps you installed it as one user and are now trying to run it as a different user? Maybe try (re)installing Python38 so that it's available for all users (there's a checkbox for this option during the installation)? Also make sure you're installing the correct 32/64 bit version.
Ok, adding the .exe to the end returned the same error messages.  So as you suggested I removed and reinstalled python38 and made sure it was set to install for all users, I have only been using this user profile, but had to install it as Admin, So I did as requested and made sure all users was checked.  This changed the installation folder to: C:\Program Files\Python38, and I checked the environment variables and it was added there as well during the install.

Running:
C:\>python.exe
'python.exe' is not recognized as an internal or external command,
operable program or batch file.

And
C:\>python.exe C:\TextureCache\texturecache.py
'python.exe' is not recognized as an internal or external command,
operable program or batch file.

As you can see returns the same error messages, So I tried the following:

C:\>cd program files
C:\Program Files>cd python38

C:\Program Files\Python38>python.exe C:\TextureCache\texturecache.py
Version: 2.5.4

Usage: texturecache.py [s, S] <string> |
                       [x, X, f, F] [sql-filter] |
etc...

I got the test parameters list!  It's weird that I cannot run python from the C:> directly and have to be in that folder, but I'll take it for now and figure out that issue later.

Thank you immensely for your patience and help with this issue even thought python install errors are not what this forum is about.
Now on to running this script again to clean up my database textures and backup my watched info.  I'm sure I'll have more questions for you soon.
Reply
BTW:  I came across my first original post to this forum: 2014-12-30, 21:58  #1,227 - Over 5 years ago.

Since then, this script has turned into a great utility and tons of additional arguments I see were added over the years.

Can I ask, with all these changes How do you use this script for your machines?  What is your daily/weekly/monthly usage/commands that you run to keep your systems fresh?
Just asking for a place to start and maybe a little insight as to what the creator does with this great script.

Also, I am cleaning up my TV shows (233 total) with new .nfo files and artwork, and use a MySQL database on my media server to hold all info.  Then run a [watched] scan with this script to backup all watched info.
Once that is done, I want to create a new database, scan in all the new info and artwork, then restore the watched status/playcount/resume markers with this script.  Do you see any issues with this being possible?

Thank you for all you do,
Mychale
Reply
Hi there,

I've been using your tool for years and it's always one of the first things i use to cache all my artwork when i install a new device.. however today i've got a new device and i'm running

./texturecache.py c

and it seems to be erroring on a huge amount of artwork..

I'm wondering if it's using the paths in my library and they are outdated maybe?

Or does it do it's own matching with tmdb.org?
Quote:2020-06-19 20:01:48.308804:Thread-3  : Retrying getDownloadURL(), 1 attempts remaining
2020-06-19 20:01:48.809878:Thread-3  : preparedl.JSON WEB REQUEST: [POST] [{"jsonrpc": "2.0", "params": {"path": "image://http%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fgJduaRau3X2oE3xkmjs1FufT2GE.jpg/"}, "method": "Files.PrepareDownload", "id": "preparedl"}]
2020-06-19 20:01:49.068281:Thread-3  : preparedl.RECEIVED WEB DATA: 200, OK, {"error":{"code":-32602,"data":{"details":null},"message":"Invalid params."},"id":"preparedl","jsonrpc":"2.0"}
2020-06-19 20:01:49.068876:Thread-3  : Image not available for download - uncacheable (embedded?), or doesn't exist. Filename [image://http%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fgJduaRau3X2oE3xkmjs1FufT2GE.jpg/]

 
Reply
@Milhouse - did my last question break you?  I posted #2,857 over a month ago.  No worries if you've been busy, and I know how IRL gets in the way of things all too well. 

it's just that you seem to reply rather quick in our previous conversations when I have issues using the script.  Hope all is well with you and yours during this crazy nightmare we are all living in ATM.

Take care, be safe.

~Mychale
Reply
When I run it with the "c" option I'm finding there's a lot of errors that are permanent.  If I run it a second time, there's still errors getting the artwork because there's nothing at the specified links.

Is there a way it can remember these errors so it will skip trying them the next time?  Or some way to manually compile the error list to feed it back into an ignore list, or something like that?

It will run for 20 minutes to get 2 images, and 2,000 errors.  Smile
Reply
Hi,

Is it possible to use texturecache.py to remove instances of deleted video files (that were never added to the media library)?  Essentially video files that I simply play (and then delete) from a folder on the network that have not been scrapped and imported into the media library.

I hope I have explained this correctly.

Thank you in advance for any help.
Reply
Hi, I'm hoping for some help please. Windows 10, python on C: drive, kodi portable on D: drive. I have strictly been trying to update with cmd texturecache.py c movies using the texturecache.cfg with my kodi path in the cfg. The utility runs but fails with errors and the errors appear to prevent the log file being written. I have even tried cmd elevated prompt but also fails with the same errors.

Advice for proceeding so I can at least get a log file written?

Thanks
Reply
What is proper syntax for using [sources]? I have my movie library split across two unraid servers. Their addresses are nfs://192.168.1.1:/mnt/user/movies, nfs://192.168.1.2:/mnt/user/movies. And I have the libraries in Kodi named "2012 and Older Movies" and "2013 and New Movies".

In particular when it comes using the [imdb] option. Allowing me to repair the imdb database fields in two steps, once with the first server, then the second.

If I understand [sources] correctly, it's meant to be used like this.
Reply
Hello
I would like to restore my watched status from a previous library export after a new installation and intend to patched watched list generated by texture and to restore it back.
Unfortunately I run into an error message when issuing the command:

[/share/CACHEDEV1_DATA/.qpkg/Texture] # ./texturecache.py watched
Traceback (most recent call last):
  File "./texturecache.py", line 8663, in <module>
    main(sys.argv[1:])
  File "./texturecache.py", line 8555, in main
    elif argv[0] == "watched" and argv[2] in ["backup", "restore"] and len(argv) in [4, 5]:
IndexError: list index out of range


Here just to show that texture seems running :
[/share/CACHEDEV1_DATA/.qpkg/Texture] # ./texturecache.py s 1917
002127|c/c83723dc.jpg|0300|0720|0001|2020-11-09 19:15:25|                   |video@/share/Public/Multimedia/Films/1917.2019.MULTi.1080p.HDLight.AC3.x264
Matching row ids: 2127
[/share/CACHEDEV1_DATA/.qpkg/Texture] #

For info, I run this commands and kodi 19 on a QNAP TS251A QTS4.
Also feel free to advice a better way to restore my watched list instead of CLI.
Reply
Hello
I would like to restore my watched status from a previous library export after a new installation and intend to patched watched list generated by texture and to restore it back.
I found how to make it generated:
./texturecache.py watched movies backup newwatchedlist.txt

But It only output items having playcount greater than 1.
So I cannot get full list changing some items and restore the updated list.

For info, I run this commands and kodi 19 on a QNAP TS251A QTS4.
Also feel free to advice a better way to restore my watched list instead of CLI.
Reply
  • 1
  • 189
  • 190
  • 191(current)
  • 192
  • 193
  • 197

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