• 1
  • 183
  • 184
  • 185(current)
  • 186
  • 187
  • 197
[RELEASE] Texture Cache Maintenance utility
1ST question.
How does vscan directory works?

I tried, 
  1. texturecache.py vscan /storage/emulated/0/Movies
  2. texturecache.py vscan movies
Prior to that, texturecache.py sources gives me, video: movies: /storage/emulated/0/Movies

I would prefer to vscan individual sources/directory. Not my whole library, is it possible?

2ND question

Possible to scan ONLY poster? Tried this, doesn't work. e.g. texturecache.py vscan movies @cache.artwork=poster

texturecache.py c movies doesn't work on new files added.
Reply
(2020-03-24, 12:04)rainman74 Wrote: ut apparently it didn't record this in the children's textures.db (because the parent profile was active) and now assumes that they are all still chached.
Yes, possible - if the rows are present in the database but the artwork is not present in Thumbnails folder then I think Kodi will not display the artwork which it can't find.

The Xd command is designed to resolve this (it will delete the rows that reference missing files) BUT this command can only be run directly on the device so you need to be logged in to the device over ssh and run the script localy as it needs direct access to the filesystem (it can't trust the Kodi JSON interface).

(2020-03-24, 12:04)rainman74 Wrote: A PSP is a Corel Paint Shop Pro file. But it should not be cached, because a suitable JPG is also in the folder.
You'll need to update your media library in that case, as the media library is trying to use the PSP file not the JPG.

(2020-03-24, 12:04)rainman74 Wrote: When I clean up the Parents profile (P), all assets of the children profile are also deleted. The parent profile is renamed from "Master user" to "Parent".
Any command that is run by the script should only update the texture cache of the currently loaded profile - it should not be modifying any other profile. Running P against the "Master user"/"Parent" profile should not have modified any other profile - each profile has it's own Textures13.db database and Thumbnails folder, so it shouldn't be possible for the script to access the assets of other profiles. Odd.
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-03-24, 17:00)clockwerk Wrote: texturecache.py vscan /storage/emulated/0/Movies
Yes, like that, BUT the path (when specified) has to be one of your configured video sources - it can't be just any random directory that contains stuff, so if /storage/emulated/0/Movies isn't one of your video sources then Kodi won't be able to access it.

You can view your current video sources with texturecache.py sources video.

(2020-03-24, 17:00)clockwerk Wrote: I would prefer to vscan individual sources/directory. Not my whole library, is it possible?

Yes, if the paths you specify are directories within an existing video source. If it's not working, check your kodi log for errors - if the directory you've asked the script to scan can't be accessed then Kodi should write a log message that it can't be accessed.

(2020-03-24, 17:00)clockwerk Wrote: Possible to scan ONLY poster? Tried this, doesn't work. e.g. texturecache.py vscan movies @cache.artwork=poster

No, that isn't supported.

(2020-03-24, 17:00)clockwerk Wrote: texturecache.py c movies doesn't work on new files added.

No idea.
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-03-24, 07:19)Milhouse Wrote:
(2020-03-23, 04:20)DjDiabolik Wrote: i take this photo from my phone:
https://imgur.com/a/tBIVSXV

@Milhouse i hope now it's all ok.
i have execute this from my tablet connect to my osmc setup by ssh client.
it's take a very long time and this is the result.... i hope all this file it's very deleted from my sd....

Yes, that looks like the expected output from the "s" command. If you run the "P" command then it will delete thumbnails that are not referenced by your media library - the script doesn't really know where the thumbnails are located, but Kodi does and it's Kodi that will delete them... 

I'm used the "P" option... not the "s". Infact after all that line now my home page it's really much smiller (about 1.7GB respect about 5GB before).
...only on your "little world" can you lay down the law...
Reply
(2020-03-25, 01:49)Milhouse Wrote:
(2020-03-24, 17:00)clockwerk Wrote: texturecache.py vscan /storage/emulated/0/Movies
Yes, like that, BUT the path (when specified) has to be one of your configured video sources - it can't be just any random directory that contains stuff, so if /storage/emulated/0/Movies isn't one of your video sources then Kodi won't be able to access it. 

Does it work for subfolders with /storage/emulated/0/Movies as the source ? e.g.
Code:
texturecache.py vscan /storage/emulated/0/Movies/A
texturecache.py vscan /storage/emulated/0/Movies/B
Reply
(2020-03-25, 08:21)clockwerk Wrote: Does it work for subfolders with /storage/emulated/0/Movies as the source ? e.g.
Code:
texturecache.py vscan /storage/emulated/0/Movies/A
texturecache.py vscan /storage/emulated/0/Movies/B

Yes, however there are some limitations.

If a folder has already been scanned into the library then you can rescan just that folder and add new files found within that folder, eg. you can scan an existing season folder for a tvshow to add new episodes, but to scan the first episode (ie. first episode of a new season) you'd need to scan the tvshow folder, or more likely scan the entire library (ie. without a path).

So, as long as /storage/emulated/0/Movies/A has already been scanned into your library at some point, then you should be able rescan only /storage/emulated/0/Movies/A for new content.

Then let's say you add new content in the folder /storage/emulated/0/Movies/Z - you'd now need to scan this "Z" folder into the library by scanning /storage/emulated/0/Movies (and if that doesn't work, scan the whole library), and then once it has been added you can incrementally scan /storage/emulated/0/Movies/Z.
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-03-25, 02:58)DjDiabolik Wrote: I'm used the "P" option... not the "s". Infact after all that line now my home page it's really much smiller (about 1.7GB respect about 5GB before).

Right, good - it's been a while since I looked at the output of the "P" command! Sounds like it's working though! Smile
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
Hi Millhouse -
Firstly, thanks so much for this utility - I only discovered it a few months ago but it has already saved me hours of time.
I am having an issue with the particular skin I use (Aura) failing to load some types of fanart from the cache, even when they're present there, meaning that they load a) slowly and b) disappear if the external source is disconnected.
In other words, it's wasting the potential advantages your tool gives via adding all fanart, posters, extrafanart etc to cache.

This is entirely the fault of the skin, and only happens on certain screens, but unfortunately the developer isn't vert active and hasn't answered any of my questions re. to how to fix it (https://forum.kodi.tv/showthread.php?tid=348947)
Are you aware of any similar issues with skins not loading from cache like this, and if there's an easy way to fix it?
Reply
I wonder if you could add an option to purge media to keep the cache under so many megabytes/gigabytes, dropping the items least recently used. For instance, to keep the media cache size under 16 GB.

Thanks.
Reply
(2020-03-25, 12:37)dbrown90 Wrote: Hi Millhouse -
Firstly, thanks so much for this utility - I only discovered it a few months ago but it has already saved me hours of time.
I am having an issue with the particular skin I use (Aura) failing to load some types of fanart from the cache, even when they're present there, meaning that they load a) slowly and b) disappear if the external source is disconnected.
In other words, it's wasting the potential advantages your tool gives via adding all fanart, posters, extrafanart etc to cache.

This is entirely the fault of the skin, and only happens on certain screens, but unfortunately the developer isn't vert active and hasn't answered any of my questions re. to how to fix it (https://forum.kodi.tv/showthread.php?tid=348947)
Are you aware of any similar issues with skins not loading from cache like this, and if there's an easy way to fix it?

I'd guess there's little that can be done - extrafanart is often implemented as a skin "hack" and depending on how this is done it may circumvent the texture cache entirely. Since you say the artwork "disappears" when the source is disconnected I suspect this is exactly what the skin is doing (circumventing the texture cache) in which case caching the extra fanart is unlikely to solve the issue. Fixing the skin is the best option (I'm afraid). Or switch to a supported skin.
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-03-25, 20:51)Milhouse Wrote:
(2020-03-25, 12:37)dbrown90 Wrote: Hi Millhouse -
Firstly, thanks so much for this utility - I only discovered it a few months ago but it has already saved me hours of time.
I am having an issue with the particular skin I use (Aura) failing to load some types of fanart from the cache, even when they're present there, meaning that they load a) slowly and b) disappear if the external source is disconnected.
In other words, it's wasting the potential advantages your tool gives via adding all fanart, posters, extrafanart etc to cache.

This is entirely the fault of the skin, and only happens on certain screens, but unfortunately the developer isn't vert active and hasn't answered any of my questions re. to how to fix it (https://forum.kodi.tv/showthread.php?tid=348947)
Are you aware of any similar issues with skins not loading from cache like this, and if there's an easy way to fix it?

I'd guess there's little that can be done - extrafanart is often implemented as a skin "hack" and depending on how this is done it may circumvent the texture cache entirely. Since you say the artwork "disappears" when the source is disconnected I suspect this is exactly what the skin is doing (circumventing the texture cache) in which case caching the extra fanart is unlikely to solve the issue. Fixing the skin is the best option (I'm afraid). Or switch to a supported skin. 
Thanks - I feared this was the case! With such minimal development going on by the skin developer at the moment, I'm unlikely to have much luck fixing it in the short term.

In the meantime I might just have to try another skin as you say, which seems a shame as I really like Aura's overall look.
Reply
@Milhouse 

Quick help...

Using ./texturecache.py x "where lastusetime <= '2013-03-05'" , I have deleted the artwork which I didn't access. However I don't any extra space after running this command and still got 13GB worth of locally cache artwork....

After running  /texturecache.py x "where lastusetime <= '2013-03-05'" , Do I need to run any other command to remove them from local cache DB?
Reply
(2020-03-30, 00:46)sniferx1 Wrote: After running  /texturecache.py x "where lastusetime <= '2013-03-05'" , Do I need to run any other command to remove them from local cache DB?

Yes, see the example in the first post.

Image

The x[/line] command gives you a list of matching database row ids - you now need to feed those into [inline]texturecache.py d # # # # # (where each # is one of the matched row ids).

So in your case:
text:

IDS=$(texturecache.py x "where lastusetime <= '2019-03-05'" 2>&1 1>/dev/null | sed "s/.*: //")
[ -n "$IDS" ] && texturecache.py d $IDS

should work on Unix/Linux (for Windows you'll need to figure it out for yourself).
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-03-30, 01:08)Milhouse Wrote:
(2020-03-30, 00:46)sniferx1 Wrote: After running  /texturecache.py x "where lastusetime <= '2013-03-05'" , Do I need to run any other command to remove them from local cache DB?

Yes, see the example in the first post.

Image

The x[/line] command gives you a list of matching database row ids - you now need to feed those into [inline]texturecache.py d # # # # # (where each # is one of the matched row ids).

So in your case:
text:

IDS=$(texturecache.py x "where lastusetime <= '2019-03-05'" 2>&1 1>/dev/null | sed "s/.*: //")
[ -n "$IDS" ] && texturecache.py d $IDS

should work on Unix/Linux (for Windows you'll need to figure it out for yourself). 

@Milhouse 

Thanks again... I ran this but getting below error... kindly help as I am not an Python expert...

shell:
osmc@MBRVero4Kplus:~$ IDS=$(texturecache.py x "where lastusetime <= '2020-02-31'" 2>&1 1>/dev/null | sed "s/.*: //")[ -n "$IDS" ] && texturecache.py d $IDS
-bash: -n: command not found
Reply
Run it as two commands, one command per line.
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
  • 1
  • 183
  • 184
  • 185(current)
  • 186
  • 187
  • 197

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