Kodi Community Forum
[RELEASE] Texture Cache Maintenance utility - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: [RELEASE] Texture Cache Maintenance utility (/showthread.php?tid=158373)



RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-08-20

(2013-08-20, 16:41)tuxen Wrote: Now I remember its name it was easy to find, is this latest version or is it obsolete?:

Still the latest version - I added a colour option to it a while ago, eg. "./bcmstat.sh -xcd10" - white for low values, green for higher values (but still OK), yellow for middle range, and red for "higher" than you'd really like (ie. maxed out)...


RE: [RELEASE] Texture Cache Maintenance utility - tuxen - 2013-08-20

Lovely thanks again.. Smile


RE: [RELEASE] Texture Cache Maintenance utility - jaykumar_2001 - 2013-08-24

(2013-07-03, 15:46)MilhouseVH Wrote:
(2013-07-03, 15:42)wishie Wrote: Really? Thats interesting, because I have 1607 movies, and only 1601 made it into the library..

Thanks again for your help, and awesome script.

The "missing" functionality is a tad experimental (as I'm not able to test with Blu-Ray and DVD disk rips) but let me know if you have any problems.

Not sure if you are already aware of this, but running missing movies texturecache script is showing up .url files as media files.

Code:
./texturecache.py missing movies Movies
The following media files are not present in the "movies" media library:

/media/2TB1_VOL0/Movies/A Good Year (2006)/imdb.url
/media/2TB1_VOL0/Movies/A Good Year (2006)/tmdb.url
/media/2TB1_VOL0/Movies/A Perfect Getaway (2009)/imdb.url
/media/2TB1_VOL0/Movies/A Perfect Getaway (2009)/tmdb.url

Thanks for the great utiliy


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-08-25

(2013-08-24, 21:52)jaykumar_2001 Wrote: Not sure if you are already aware of this, but running missing movies texturecache script is showing up .url files as media files.

The missing option will exclude what it considers to be "nonmedia" files (eg. .nfo, .log, .jpg, .png etc.), then report what remains which should hopefully be your media files (eg. mkv, .avi etc.). I don't know what a .url file is or why you have it in your media library (as it's not read by XBMC as far as I'm aware), however if you add:

Code:
nonmedia.filetypes = .url

to your properties file, it will be excluded too.


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-09-03

Version 0.9.5
  • Add: Option remove to remove from media library musicvideo, movie, tvshow or episode for a specific libraryid, eg. remove movie 619
  • Add: Show player progress in status



RE: [RELEASE] Texture Cache Maintenance utility - piotrasd - 2013-09-14

I discover one bug, when somebody use dds for funarts etc - texturecaching dont see them :/ just looking for jpeg

screen
https://www.dropbox.com/s/ep0vdce4esstghh/Zrzut%20ekranu%202013-09-14%2021.26.01.png

i check directory and files exist but with extension .dds - example

e/e78c9687.dds

Good will be add option - if jpeg are missing automatical check if this file exist with extension .dds


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-09-15

That would be because the database refers to the jpg, not the dds.

Not sure what has happened here - have the jpg files been wiped from the thumbnails folder at some point, and now only the dds files remain?

Your point is valid though - when removing the artwork file from the thumbnail folder, it should also check if there is a dds file and remove that too. Although it should still warn when the jpg is missing.


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-09-15

Version 0.9.7
  • Add: When removing artwork files, remove any matching dds file also



RE: [RELEASE] Texture Cache Maintenance utility - CaptainKen - 2013-09-15

I'd like to create a batch file to run periodically for routine maintenance. Would this suffice, or do you have a better method?

Code:
SET "TITLE=Python TextureCache Routine Maintenance"

TITLE %TITLE%
COLOR FC
REM MODE CON: COLS=190 LINES=80
MODE CON: COLS=190

cd\
cd\python27

REM -> To auto update to newest texturecache.py
texturecache.py update

REM -> Remove Orphan files from the Thumbnails folder
REM If there are "too many" Orphan files (ie. more than 5% of your entire Thumbnails folder) then enable
REM "orphan.limit.check = no" in the properties file for the script to proceed with removal
texturecache.py R

REM --> ReCache only Movies that NEED caching (most use lower case "c")
REM Also run after Movie Set Artwork Automator to clean up the backslash problems in paths
texturecache.py c

pause



RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-09-15

I can't comment on the validity of the code as I'm not a Windows batch expert, but the general principle looks OK.

In the comment you mention only caching movies but will in fact be re-caching pretty much everything - change "texturecache.py c" to "texturecache.py c movies" to cache only movies, or even "texturecache.py c video" to cache only video related artwork (movies + sets + tvshows).

If you're running this on a regular basis you may want to try the "incremental" caching option, lc rather than c, which will only re-cache items added since the timestamp of the file specified by the property lastrunfile. At the end of your batch script, touch the lastrunfile to record a new timestamp.

Note also that texturecache.py doesn't fix (or clean) anything with respect to paths that have been mangled by Movie Set Artwork Automator, it is just is a bit more tolerant of such path mangling.


RE: [RELEASE] Texture Cache Maintenance utility - CaptainKen - 2013-09-16

(2013-09-15, 21:48)MilhouseVH Wrote: I can't comment on the validity of the code as I'm not a Windows batch expert, but the general principle looks OK.

In the comment you mention only caching movies but will in fact be re-caching pretty much everything - change "texturecache.py c" to "texturecache.py c movies" to cache only movies, or even "texturecache.py c video" to cache only video related artwork (movies + sets + tvshows).

If you're running this on a regular basis you may want to try the "incremental" caching option, lc rather than c, which will only re-cache items added since the timestamp of the file specified by the property lastrunfile. At the end of your batch script, touch the lastrunfile to record a new timestamp.

Note also that texturecache.py doesn't fix (or clean) anything with respect to paths that have been mangled by Movie Set Artwork Automator, it is just is a bit more tolerant of such path mangling.

Thank for your response and the guidance!

Shall I assume that you cleaned up the path issues on my db using an update query? If so, would you mind sharing it with me?


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-09-16

(2013-09-16, 01:06)CaptainKen Wrote: Shall I assume that you cleaned up the path issues on my db using an update query? If so, would you mind sharing it with me?

Within the script I detect the path issues and fix them on the fly, but it's not done in SQL - have a look at the function fixSlashes().


RE: [RELEASE] Texture Cache Maintenance utility - CaptainKen - 2013-09-16

Oops we both posted at the same time, so I moved this edit to a new reply.

1) How do I touch the "lastrunfile" as you mention?

2) I keep getting the same results after every run:
Image

LOG: http://pastebin.com/embed_js.php?i=HSwvkHa0


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-09-16

(2013-09-16, 01:36)CaptainKen Wrote: 1) How do I touch the "lastrunfile" as you mention?

In Windows, something like the following should suffice:
Code:
echo "hello" > c:\tclastrun.dat
and in your texturecache.cfg properties file add
Code:
lastrunfile = c:\tclastrun.dat

(2013-09-16, 01:36)CaptainKen Wrote: 2) I keep getting the same results after every run:

For some reason XBMC can't access those files - you need to check your xbmc.log to see what errors there are. Make sure there are no typos, extra spaces or other differences between the filenames on your server, and the filenames in the library.

If you can't spot the problem, try pasting the output from the following:
Code:
texturecache.py directory "smb://SERVER2/video2/Movies/Broken City (2013) [OffLine]"



RE: [RELEASE] Texture Cache Maintenance utility - CaptainKen - 2013-09-16

(2013-09-16, 01:58)MilhouseVH Wrote:
(2013-09-16, 01:36)CaptainKen Wrote: 2) I keep getting the same results after every run:

For some reason XBMC can't access those files - you need to check your xbmc.log to see what errors there are. Make sure there are no typos, extra spaces or other differences between the filenames on your server, and the filenames in the library.

If you can't spot the problem, try pasting the output from the following:
Code:
texturecache.py directory "smb://SERVER2/video2/Movies/Broken City (2013) [OffLine]"

Thanks, man I wish XBMC could do it's own updating and clean up. I had renamed several movies and missed updating those two.

What does it mean when it says they can't be downloaded? It lists the same ones every time I run this.
Image

Are those slashes at the end supposed to be there?