Kodi Community Forum

Full Version: Help needed to use Texture Cache Maintenance utility
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello i'm new to spmc/kodi and i would like to use this to clean my thumbnails. I have a fire tv with spmc 14.1

i just don't understand how to use this so if someone can help i would really appreciate it

So far i i downloaded texturecache.py, and also downloaded python. i enabled web server and created a password on my fire tv.

Do i create a texturecache.cfg now? i dont know what to write.

so if anyone can help me write the texturecache.cfg i would really appreciate it

i am just trying to trim down the thumbnails folder and delete unused thumbnails

so far i got this

sep = |
userdata = ~/.kodi/userdata
dbfile = Database/Textures13.db
ebserver.port = 8080
webserver.username =
webserver.password =
I'm in the same boat. The instructions are for professional coders or people with advanced computer science degrees. I got as far as installing python. I was proud that I figured out how to run the "hello world" script. However, it seems that's just the beginning. I have no idea what to do next nor how to even tell python what to do. I just want to clear out my 2GB of crap Kodi has been building up. This is insane. At least the illegal maintenance addons are simple.
Found a solution: by deleting the thumbnail folder and then letting Kodi repopulated it, the folder size went from 2.03gb down to 69mb. And I didn't even have to learn a new computer language. These instructions worked for me:

http://www.htpcbeginner.com/clear-kodi-t...ils-cache/
I'm not really sure where or what the difficulty is.

1. Install Python (if required)
2. Install texturecache.py (as instructed in the support thread).
3. Run it as described.

On a Linux system that already has Python installed you can be up and running in 10 seconds flat.

You shouldn't need to create or set anything in texturecache.cfg unless you want to start specifying non-default values.
My Dear Mr. Milhouse,

I hope I'm not mistaken, but it sounds like you're asking for my feedback. I am an average moron and can only tell you about the way I don't know the things I don't know, but I'll do my best to relate my difficulties over several hours of futilely struggling to understand your work.

First of all, I'm not on Linux. I don't mean to sound snarky and I'm not proud of my ignorance. I'm sure Linux is awesome, but I'm on Windows 7 with the majority of the world and until today I only thought a python was a snake.

The Kodi wiki mentioned your software in a casual way, leading me to believe that your Texture Cache Maintenance utility was intended for an average user like me with low skills. A quick glance at the sheer length of your instructions had me thinking twice. It's well over a thousand words before you get to step 1. Remember, I just wanted to delete some thumbnails taking up space without screwing things up with my naivety.

The first step you send the reader on is a 700 word, dense and jargony passage about how to run a python script. This article continually makes use of undefined terms which the reader is already supposed to be fluent with:"script, interpreter, shell, command prompt, live environment, path, argument, executable, terminal." The fact that you linked such an article was further dissuasion for me. Even in retrospect, re-reading it, it's difficult for me to comprehend, and at the time I was impatient to get to what I was hoping was a big shiny red button at the end which would flush my thumbnails.

Second step is the installation of python. Immediately, I'm given more choices which require more research. Python 2.7.x or Python 3.3.x? 32bit or 64bit? Sweet lord, ten different installers! More googling. What's a tarball? Do I have the right processor for this? I have to watch 5 different youtube videos, and each instructor does the installation a little differently. Where should Python be installed? What's all this about PATHs? What's a path!? This part is scary because the instructions say if I screw up the paths I could brick my pc. The first time I install Python, the installer sticks everything in some user folder god knows where and I can't even find it. I uninstall and try again. Have to google and learn about every installation option. It takes about two hours. At this point I'm about three hours into trying to delete my thumbnails and questioning my life choices. Is this how I should be spending my day?

So finally I'm on step three, "Download the single Python script file". I mistakenly think you mean the one in the github link. When I left-click on texture.py, github opens it wide up, so I hit the back button, right-click, and "saved link as." I drag texturecache.py into the python36 folder. I restart the computer one more time just to be safe. Showtime! I open the command prompt by typing cmd in the start menu search. I type "cd c:\python36". I type "python texturecache.py" syntax error.

Now I'm in trouble shooting mode. I crack open the official Python tutorial and I'm looking at 127 lines of links. No joke, this is a 300 page book. So instead of going to Python college, I find a super simple "hello world" script, copypasta, and test. It works! I finally figure out to change texturecache.py to .txt, open it, and find that the insides are all html. Even I know that's wrong. I go back to your page and find the correct link. Another hour has elapsed.

But I'm there. The shiny red button is close. I kill a chicken, sprinkle its entrails on my keyboard, and I'm there. I'm finally looking at what I'm supposed to be. And I don't understand any of it. All this text flew by, and now my command prompt is still sitting after c:\Python36 doing nothing. I see the word "config" in your text, and it looks harmless, so I type "config" and hit enter. "'config' is not recognized as an internal or external command, operable program, or batch file." I have the sinking feeling that things aren't about to get easier. I hate you, command prompt! What do you want from me!? Delete my thumbnails!

I glance again, sullenly, at the 300 page python tutorial. I look at your page again. There's something called "texturecache.cfg". I have to learn what it is and how to write one myself. uh.... I go back and skim through the Summary of features. Every time I try to read it my eyes cross. "accumulated cruft" "Extract rows from texture cache database" "Query media library using JSON API" Oh, no... What if this thing doesn't delete thumbnails?

I couldn't even read your instructions. I didn't understand what your script did nor how to make it do it. I was good and ready to give up. I made one last search bringing me to this abandoned thread from another lost soul, nero25, who had been ignored and forgotten.

Then I remember something quick and dirty I'd googled earlier. I'd passed on it then because I worried about deleting files willy nilly and wanted to do things the Kodi way. But Kodi way was way too much for me. Five minutes later, my thumbnails are deleted.

Mr Milhouse, I'm grateful for the work you do. I flat can't do what you do. I'm grateful for your generosity of spirit in gifting the world this wonderful program free of charge. However, I do not believe that your python solution is suitable for the general public. For advanced users, I'm sure it's wonderful, but for us dummies, the five minute solution is enough challenge.

I hope you find this in some way constructive.

Most sincerely,

Piso Mojado
(2017-02-07, 13:06)Pisomojado Wrote: [ -> ]However, I do not believe that your python solution is suitable for the general public. For advanced users, I'm sure it's wonderful, but for us dummies, the five minute solution is enough challenge.

I hope you find this in some way constructive.

Most sincerely,

Piso Mojado

Thanks for the description of the problems you faced, it is appreciated, but unfortunately some of that can be blamed on Windows being what it is (ie. a bit crap for anything that doesn't have a GUI or that isn't a one-click compiled binary) and a lack of detailed instructions on how to install Python (I hadn't realised - or maybe I'd forgotten - it was that complicated for Windows users!) This isn't a dig at Windows (I use it daily), but it really is a completely different world for things like Python scripts when using other operating systems and that's the world I (and many others) are coming from when using texturecache.py, and - I'll be honest - I'm afraid I also don't have the time/inclination to write detailed support instructions solely for Windows users.

However I do state fairly early on (3rd paragraph) that the texturecache.py script "... also assumes you are comfortable working at the command line" so if that doesn't describe you then I'm afraid this is not the tool for you (there is a thumbnail cleaner Kodi add-on available which may be more appropriate).

I've never tried to hide the fact that texturecache.py is not a pretty GUI tool with buttons that can be clicked. Instead it's a fairly ugly and often incomprehensible command line utility that isn't always easy to work with, and that does have a (possibly steep?) learning curve, but which can be very useful once mastered.

Users that are not familiar/comfortable with the command line will find it even more daunting, and that's why I point out early on that such users are not the target audience for this script.
That makes sense. Thank you kindly for taking the time to reply.

I found the addon! I was searching like crazy the other day for such a thing and could never find an official one (just the illegal ones). It's definitely not mentioned in the wiki.

But here it is: http://forum.kodi.tv/showthread.php?tid=264018