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 - QuattroGam3r - 2015-03-07

Excellent, I set rpc.ipversion = 4 in the cfg file and now it runs in less than 30 seconds. Thank you for the fix.

As for the ipv6 issue, I believe that problem lies in Apple products. They don't trust ipv6, so ipv4 is set to take priority. Unfortunately I have Apple routers and computers, so Probably not going to be able to fix that. Of course that's based on info I researched a few years ago, but it still seems to be the case.


RE: [RELEASE] Texture Cache Maintenance utility - raspberry_pd - 2015-03-07

Hi

Thanks again for this great script.

Checked the documentation and tried several options, all of which just return minimally-legible JSON errors. How do I use the play option? I don't get the need for a player when AFAIK my Raspberry Pi setup only has one (omxplayer?).

Code:
play       Play the specified item (on the specified player: null, default, #)

Nor do I understand what a valid "item" would be.

Code:
play item [playerid]

Tried full episode titles as the "item". Tried episode id as the "item". No luck.

Please help Smile

pd


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2015-03-07

You can pass a url, or file system path (ie. nfs://), as the "item".

Example:

Code:
texturecache.py play "nfs://192.168.0.3/mnt/share/media/Video/MoviesSD/Avatar (2009)[DVDRip].m4v"
texturecache.py play "http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/nonuk/sbr_low/llnw/bbc_radio_fourfm.m3u8"

The file system path has to be accessible by Kodi, so it has to be a path that is present in your sources.xml.


RE: [RELEASE] Texture Cache Maintenance utility - raspberry_pd - 2015-03-08

Thanks Milhouse!


RE: [RELEASE] Texture Cache Maintenance utility - kimme - 2015-03-09

Thanks, this script has helped me with rebuilding my picture cache/database on my Raspberry Pi when I upgraded from version 1B to 2.

Had only to manually make the texturecache.cfg with putty when I ssh'ed to my pi with adding the correct name and password for my webserver...


RE: [RELEASE] Texture Cache Maintenance utility - isamu.dragon - 2015-03-14

If I may request a minor feature.

Could we have a prune option similar to the cache option

Code:
./texturecache.py P movies
./texturecache.py P sets
./texturecache.py P tvshows
./texturecache.py P artists
./texturecache.py P albums
./texturecache.py P songs

that way it doesn't wipeout stuff like youtube, or if we are removing items from only 1 of those types


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2015-03-14

Not really. The prune option is identifying cached artwork that is not also present in the media library, and therefore suitable for "pruning".

The prune option has no idea what type of cached artwork it is dealing with because, by definition, it's not in the media library which would allow a "type" to be determined for the artwork.

The script simply doesn't know if the cached artwork is (was) a movie, or tvshow, etc., so a media class can't be applied to the prune option.

If there are particular urls you want to retain while pruning, you can add patterns to @prune.retain.types, eg. "@prune.retain.types=.*youtube.com.*", which will prevent matching urls from being removed.


RE: [RELEASE] Texture Cache Maintenance utility - QuattroGam3r - 2015-03-17

@Milhouse, could you please help me. I just upgraded to a PI2 running OSMC RC and for whatever reason I cannot run ./texturecache.py. I've done the chmod +x, i've tried moving it out of the osmc directory. I just can't understand why when I run it, it says No such file or directory. Even though ls shows it right there. The only reason i'm trying to run it locally is that when I try to run S,s,R or r from my mac it tells me:

FATAL: The task you wish to perform requires read/write file
access to the Thumbnails folder, which is inaccessible.

Specify the location of this folder using the thumbnails property
as an absolute path or relative to the userdata property.

The currently configured Thumbnails path is:
/home/osmc/.kodi/userdata/Thumbnails/

Check userdata and thumbnails settings in properties file texturecache.cfg

Thumbnails folder is set to 755 by default (drwxr-xr-x), and the path looks correct, but it won't run without FATAL. Please help me figure out what i'm missing here.


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2015-03-17

(2015-03-17, 02:16)gardnerd4me Wrote: I cannot run ./texturecache.py.

Is Python installed by default on OSMC? What do you see if, on OSMC, you run "python --version", "which python" and finally "echo $PATH"?


RE: [RELEASE] Texture Cache Maintenance utility - QuattroGam3r - 2015-03-17

Python 2.7.9


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2015-03-17

What about:
Code:
which python
echo $PATH
And in the directory where you have the script:
Code:
pwd
ls -la

I can only imagine the script is not finding your Python interpreter, for some reason. Also double check you haven't downloaded the HTML web page instead of the script source code.


RE: [RELEASE] Texture Cache Maintenance utility - QuattroGam3r - 2015-03-17

(2015-03-17, 02:38)Milhouse Wrote: What about:
Code:
which python
echo $PATH
And in the directory where you have the script:
Code:
pwd
ls -la

I can only imagine the script is not finding your Python interpreter, for some reason. Also double check you haven't downloaded the HTML web page instead of the script source code.

which python
/usr/bin/python

echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/opt/vc/bin

pwd
/home/osmc

ls -la
osmc@osmc:~$ ls -la
total 60
drwxr-xr-x 8 osmc osmc 4096 Mar 16 16:57 .
drwxr-xr-x 3 root root 4096 Dec 31 1969 ..
-rw------- 1 osmc osmc 26 Mar 15 23:44 .bash_history
-rw-r--r-- 1 osmc osmc 220 Nov 12 15:21 .bash_logout
-rw-r--r-- 1 osmc osmc 3515 Nov 12 15:21 .bashrc
drwxr-xr-x 8 osmc osmc 4096 Dec 31 1969 .kodi
-rw------- 1 osmc osmc 9016 Mar 15 14:00 lircd.conf
drwxr-xr-x 2 osmc osmc 4096 Mar 14 16:15 Movies
drwxr-xr-x 2 osmc osmc 4096 Mar 14 16:15 Music
drwxr-xr-x 2 osmc osmc 4096 Mar 14 16:15 Pictures
-rw-r--r-- 1 osmc osmc 675 Nov 12 15:21 .profile
drwxr-xr-x 2 osmc osmc 4096 Mar 15 14:09 .smb
drwxr-xr-x 2 osmc osmc 4096 Mar 14 16:15 TV Shows


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2015-03-17

I don't see texturecache.py in your /home/osmc directory...


RE: [RELEASE] Texture Cache Maintenance utility - QuattroGam3r - 2015-03-17

Sorry, I had deleted it.

ls -la
total 364
drwxr-xr-x 8 osmc osmc 4096 Mar 16 17:46 .
drwxr-xr-x 3 root root 4096 Dec 31 1969 ..
-rw------- 1 osmc osmc 26 Mar 15 23:44 .bash_history
-rw-r--r-- 1 osmc osmc 220 Nov 12 15:21 .bash_logout
-rw-r--r-- 1 osmc osmc 3515 Nov 12 15:21 .bashrc
drwxr-xr-x 8 osmc osmc 4096 Dec 31 1969 .kodi
-rw------- 1 osmc osmc 9016 Mar 15 14:00 lircd.conf
drwxr-xr-x 2 osmc osmc 4096 Mar 14 16:15 Movies
drwxr-xr-x 2 osmc osmc 4096 Mar 14 16:15 Music
drwxr-xr-x 2 osmc osmc 4096 Mar 14 16:15 Pictures
-rw-r--r-- 1 osmc osmc 675 Nov 12 15:21 .profile
drwxr-xr-x 2 osmc osmc 4096 Mar 15 14:09 .smb
-rwx--x--x 1 osmc osmc 308370 Mar 16 17:46 texturecache.py
drwxr-xr-x 2 osmc osmc 4096 Mar 14 16:15 TV Shows

osmc@osmc:~$ ./texturecache.py
: No such file or directory


RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2015-03-17

Doesn't look right... This is for the latest v1.8.9:

Code:
rpi22:~ # ls -la texturecache.py
-rwxr-xr-x    1 root     root        300608 Mar  6 17:26 texturecache.py
rpi22:~ # md5sum texturecache.py
3fccb179b5694cd806420261f6b7292e  texturecache.py

Your file is considerably larger than it should be. Either you've downloaded an incorrect file, or you've downloaded the correct file but with DOS line endings. Download it again using the instructions in the first post.