•
• 1
• 31
• 32
• 33(current)
• 34
• 35
• 193
•
[RELEASE] Texture Cache Maintenance utility
(2013-11-19, 01:38)Enlightened Wrote: the only experience I have with python is using it to run headphones for music. I'm not sure how to get it running. I've opened texturecache.cfg with python but a window only opens for a few seconds.
my main machine that holds myqsl loads all thumbs instant. my other PCs loads slow and some thumbs don't load at all. my htpc is an a6 apu with an ssd and 8GB of ram. I don't think it should be as slow as it is. Will this script solve this?
I have a large library of media.

I don't know what OS you are using on your HTPC, if you explain that then it will be easier to help you.

You don't really need any Python experience, just the ability to follow the installation instructions. If you're on Windows, install Python 2.7.3, if you're using Linux (OpenELEC etc.) then Python should already be installed.

Next, download the Texture Cache script from the download link in the first post (download the source code, not the web page). If you're on Windows, open the one of the "wget" urls in your browser and click "Save as". The script is called texturecache.py, and the optional configuration properties are in the texturecache.cfg file. It sounds like you are trying to execute the properties file as though it were a Python program, and not the script itself.

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.
(2013-11-19, 02:28)MilhouseVH Wrote:
(2013-11-19, 01:38)Enlightened Wrote: the only experience I have with python is using it to run headphones for music. I'm not sure how to get it running. I've opened texturecache.cfg with python but a window only opens for a few seconds.
my main machine that holds myqsl loads all thumbs instant. my other PCs loads slow and some thumbs don't load at all. my htpc is an a6 apu with an ssd and 8GB of ram. I don't think it should be as slow as it is. Will this script solve this?
I have a large library of media.

I don't know what OS you are using on your HTPC, if you explain that then it will be easier to help you.

You don't really need any Python experience, just the ability to follow the installation instructions. If you're on Windows, install Python 2.7.3, if you're using Linux (OpenELEC etc.) then Python should already be installed.

Next, download the Texture Cache script from the download link in the first post (download the source code, not the web page). If you're on Windows, open the one of the "wget" urls in your browser and click "Save as". The script is called texturecache.py, and the optional configuration properties are in the texturecache.cfg file. It sounds like you are trying to execute the properties file as though it were a Python program, and not the script itself.

I have windows 8. how do I run it on xbmc?
(2013-11-19, 02:44)Enlightened Wrote: I have windows 8. how do I run it on xbmc?

Once you've installed Python somewhere, eg. in C:\Python27, you would run the script as follows:
Code:
C:\Python27\python.exe C:\texturecache.py c all

This assumes you have saved the script as C:\texturecache.py, and that any properties file you create is in the same folder as the script, ie. C:\texturecache.cfg.

Unless you're running a very recent Gotham nightly, the script will require access to your XBMC Userdata folder - it will use standard default values for this, but if your're using a non-standard XBMC installation then configure the path in the properties file (set the userdata property, ie. "userdata = X:\path\to\userdata"). If however you're using a recent Gotham build (from within the last week or so) you don't need to worry about setting the userdata property or having direct access to the files in that folder (at least not for caching, or pruning).

Just one more thing - adjust the width of your command prompt window so that lines don't wrap and make the output unreadable. Right click in the title bar of your command window, select Properties from the menu, and on the Layout tab increase both "Width" settings to about 160, then click OK.
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.
just getting invalid syntax
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.
I've done everything you posted. have texturecache.py(the script not a webpage) and texturecache.cfg(pointing to my userdata) in C:\
then I open a python window set width to 160
then type C:\Python27\python.exe C:\texturecache.py c all and hit enter
all that happens is syntac error: invalid syntac
i have xbmc running with webserver port set to 8080 and user xbmc no pass
Open texturecache.py in Notepad, does it look as follows?
Code:
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # #  Copyright (C) 2013 Neil MacLeod ([email protected]) # #  This Program is free software; you can redistribute it and/or modify #  it under the terms of the GNU General Public License as published by #  the Free Software Foundation; either version 2, or (at your option) #  any later version. # #  This Program is distributed in the hope that it will be useful, #  but WITHOUT ANY WARRANTY; without even the implied warranty of
(it may appear as one mass of text with no line breaks, but you should at least be able to confirm if it starts with "#!/usr/bin/env python")

Or does it look completely different?
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.
(2013-11-19, 03:33)MilhouseVH Wrote: Open texturecache.py in Notepad, does it look as follows?
Code:
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # #  Copyright (C) 2013 Neil MacLeod ([email protected]) # #  This Program is free software; you can redistribute it and/or modify #  it under the terms of the GNU General Public License as published by #  the Free Software Foundation; either version 2, or (at your option) #  any later version. # #  This Program is distributed in the hope that it will be useful, #  but WITHOUT ANY WARRANTY; without even the implied warranty of

Or does it look completely different?

#!/usr/bin/env python
# -*- coding: utf-8 -*-

################################################################################
#
#
# This Program is free software; you can redistribute it and/or modify
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Simple utility to query, validate, clean and refresh the XBMC texture cache.
#
# https://github.com/MilhouseVH/texturecache.py
#
# Usage:

exactly that
OK that looks fine.

In which case I don't really know, it's all working fine here (testing on Windows 7) and other Windows users have no problem.

Let's just confirm your Python installation is working correctly - paste the following into your command window, and then paste the result back here:
Code:
c:\Python27\python.exe -c "import sys; print(sys.version)"

Other than that, like I say, a screenshot would help.
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.
still same error even on my main PCs when I use c:\Python27\python.exe -c "import sys; print(sys.version)"
I have 2.7.3 installed to c:\ on both PCs.
what do you want a screenshot of?
(2013-11-19, 04:00)Enlightened Wrote: what do you want a screenshot of?

Your command window, to confirm exactly what it is you are typing/seeing, however it sounds like you've not installed Python correctly (or are referencing the wrong location for Python), and that it's nothing to do with this script as you can't even get your PC to run the most basic Python commands.

You need to figure out what, where and how you've installed Python before proceeding further - this is what I see on my machine:
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.
ok from your screenshot I should be using windows command prompt not the python command.
I'm a dumbass you sir are awesome. Thank you
No worries, I'll try to remember that one for next 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.
wow this looks like a pretty neet tool.
im not quite what it is I am doing and need a little help here.

i am trying to clean up my thumbnails.
ive got about 46000 files which take a lot of space.

I have run the command P and that got rid of about 7100 files yay.....
but it is still not enough.

then i tried the R command (not quite sure of what it is doing) but anyway....
this is the result i got

./texturecache.py R
Found 31,197 orphaned files for 2,621 database files.

This is far too many orphaned files for this number of
database files - more than 5% - and something may be wrong.

Check your configuration, database, and Thumbnails folder.

Add "orphan.limit.check = no" to the properties file
if you wish to disable this check.

can some please explain in detail what the "R" does. and perhaps how I get around the error above?
(2013-11-19, 20:16)bit phreak Wrote: then i tried the R command (not quite sure of what it is doing) but anyway....
this is the result i got

./texturecache.py R
Found 31,197 orphaned files for 2,621 database files.

This is far too many orphaned files for this number of
database files - more than 5% - and something may be wrong.

Check your configuration, database, and Thumbnails folder.

Add "orphan.limit.check = no" to the properties file
if you wish to disable this check.

can some please explain in detail what the "R" does. and perhaps how I get around the error above?

The "R" command (it was originally named as it's a kind of reverse lookup) finds those files in your Thumbnails folder that are NOT referenced in your Textures13.db database - ie. they are those files that are serving no purpose whatsoever and just taking up disk space, as they're no longer being used by XBMC. I refer to these files as "orphans" as usually they would have been referenced by XBMC at some point, perhaps in an earlier version of XBMC (ie. Eden?) but are now no longer used or needed.

How you have managed to acquire so many orphans you don't say, but I imagine it's because you have upgraded from a much earlier version of XBMC (pre-Frodo).

As things stand, you currently have 31,197 orphaned files (that can be deleted) and only 2,621 non-orphan files (that you want to keep). Under normal circumstances, you may have only a handful of orphan files, if that. Hence the safety check to avoid a catastrophic coding error on my part (it happened once - oops!).

However if my explanation makes sense, and you can think of a reason why you would have so many orphan files, then add the "orphan.limit.check=no" property to your texturecache.cfg file and run the "R" option again - this time it will remove all the orphan files. Alternatively add the property to your command line so it only applies to that invocation of texturecache.py, ie:
Code:
./texturecache,py R @orphan.limit.check=no
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.
•
• 1
• 31
• 32
• 33(current)
• 34
• 35
• 193
•

This forum uses Lukasz Tkacz MyBB addons.