• 1
  • 126
  • 127
  • 128(current)
  • 129
  • 130
  • 197
[RELEASE] Texture Cache Maintenance utility
here it is

http://sprunge.us/idMF

a second vscan log:
http://sprunge.us/Zaig
Reply
So the first log should have produced:

Code:
Rescanning library...
Updating library: New episodeid   870
Updating library: New episodeid   870
Updating library: New episodeid   871
Updating library: New episodeid   871
Updating library: New episodeid   872
Updating library: New episodeid   872
Updating library: New episodeid   873
Updating library: New episodeid   873
Updating library: New episodeid   874
Updating library: New episodeid   874

and the second log:
Code:
Rescanning library...
Updating library: New episodeid   875
Updating library: New episodeid   875
Updating library: New episodeid   876
Updating library: New episodeid   876
Updating library: New episodeid   877
Updating library: New episodeid   877
Updating library: New episodeid   878
Updating library: New episodeid   878
Updating library: New episodeid   879
Updating library: New episodeid   879

The first episode, id #870, is coming from these two notifications:
Code:
2016-03-02 09:27:13.640251:MainThread: libRescan.PARSING JSON DATA: {"jsonrpc":"2.0","method":"VideoLibrary.OnUpdate","params":{"data":{"item":{"id":870,"type":"episode"},"transaction":true},"sender":"xbmc"}}
...
2016-03-02 09:27:13.646564:MainThread: libRescan.PARSING JSON DATA: {"jsonrpc":"2.0","method":"VideoLibrary.OnUpdate","params":{"data":{"item":{"id":870,"type":"episode"},"transaction":true},"sender":"xbmc"}}

that Kodi is generating for some reason. The episode ids are all sequential, so are being generated by Kodi.

However I've no idea what is causing this, particularly if you say you have no episode with id 870. Do you have any third-party add-ons installed that may be interfering with the scan process?

If you run "texturecache.py stats" before a vscan, and then again afterwards, it will be interesting to see if the number of Episodes remains the same.
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
(Yes 5, In case you wonder.... my original copy/paste was missing 1 therefore I didn't change my story since it doesn't matter - the hard reality as been revealed now) :-)

Before and after a scan I got the same stats
Code:
OpenELEC:~ # texturecache.py stats
Profile    : Master user
Albums     : 0
Artists    : 0
Songs      : 0
Movies     : 898
MovieSets  : 67
TVShows    : 30
Episodes   : 223
MusicVideos: 0
Addons     : 111

The only add-ons I have are related to my skin : Aeon Nox Silvo
But it does use a lot of them.

I will be reinstalling from scratch in the next few days, I'll see if I do have the same behavior after.
Reply
Hi Milhouse

I've been away from Kodi-World for a bit, and picking up where I left off, I see I've made quite a cleanup job for myself.

Q1: is it possible I've managed to delete art files from my media folders, using any of the scripts ?

I ask because I'm finding more than a few cases where the library has links to art files that are now gone from the FreeNAS folders. I'm wondering what sequence of operations I could have done to make this happen (...if at all) ?

An example:
Code:
OpenELEC:~/.kodi/userdata/_TextureCache # ./texturecache.py jd movies "sherlock holmes faces death"
[
  {
    "art": {
      "fanart": "image://smb://FREENAS/media/Movies/Sherlock Holmes Faces Death (1943)/Sherlock Holmes Faces Death (1943) [BrRip]-fanart.jpg/",
      "fanart1": "image://http://image.tmdb.org/t/p/original/2rkwFOAjJY4BFRDa0Ri89L4pScD.jpg/",
      "poster": "image://smb://FREENAS/media/Movies/Sherlock Holmes Faces Death (1943)/Sherlock Holmes Faces Death (1943) [BrRip]-poster.jpg/"
    },
    "file": "smb://FREENAS/media/Movies/Sherlock Holmes Faces Death (1943)/Sherlock Holmes Faces Death (1943) [BrRip].mkv",
    "label": "Sherlock Holmes Faces Death",
    "movieid": 3175,
    "title": "Sherlock Holmes Faces Death"
  }
]
OpenELEC:~/.kodi/userdata/_TextureCache #

Whilst the database links to local "fanart" and "poster" files, these do not exist today in the Sherlock folder.

I DO find two others: "banner" and "landscape" files are in the folder, but are no longer in the db, nor apparently in the thumbmail cache (these two do not appear in the GUI, though they did before I caused all the trouble).

Q2: at what point does it make sense to start with a fresh empty database and re-scan the whole thing ? Chasing "some are listed, some are not" is getting tiresome. If that is the better way to go, are there any tricks to know about doing this within OpenELEC ?

Thank you Milhouse, for any pointers.
::  LibreELEC 9.2.6 RELEASE - Generic x86_64  ::  Intel 847 NUC  ::  KVR1333D3S9/4G  ::  Kingston SMS200S3/30G mSATA  ::  MS 1044 MCE keyboard  ::  GP-IR02BK remote  ::  Xonfluence  ::  10.9TiB on FreeNAS v11.3-U5 (RAID-Z2)  ::
Reply
(2016-03-08, 11:53)gjwAudio Wrote: Q1: is it possible I've managed to delete art files from my media folders, using any of the scripts ?

The only files deleted by the script are cached artwork files in the Texture Cache "Thumbnails" folder - in most cases this will use Kodi JSON TextureDB API to actually delete the Thumbnails files.

None of the scripts (texturecache.py, mklocal.py) will delete files from your media libary. mklocal.py is the only script with direct filesystem access to your library, and it will create (ie. download) new files but will not delete artwork files that already exist in your library.

If artwork files are disappearing from your media library, it's not through the action of these scripts.

(2016-03-08, 11:53)gjwAudio Wrote: Q2: at what point does it make sense to start with a fresh empty database and re-scan the whole thing ? Chasing "some are listed, some are not" is getting tiresome. If that is the better way to go, are there any tricks to know about doing this within OpenELEC ?

If you've lost control of your media library, now would seem like a good time to start again.

However, if artwork is randomly disappearing from your library you need to carefully review what processes you are using to manage your library as I'm pretty sure my scripts will not be responsible for your artwork disappearing, and unless you identify the cause it's likely to continue.
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 Milhouse

Thanks for confirmation - I thought it was "safe" to use your scripts in this context. And yes - "out of control" is the polite way to describe it Angry

Are there any steps you'd suggest before I nuke Thumbnails, Textures and MyVideos (aside from saving copies to an offline location, just-in-case) ?

Is this where I dump AD, and rely on Artwork Beef alone ?

Is my real friend going to be a Kodi-friendly media manager ?

Thanks again for help and understanding.
::  LibreELEC 9.2.6 RELEASE - Generic x86_64  ::  Intel 847 NUC  ::  KVR1333D3S9/4G  ::  Kingston SMS200S3/30G mSATA  ::  MS 1044 MCE keyboard  ::  GP-IR02BK remote  ::  Xonfluence  ::  10.9TiB on FreeNAS v11.3-U5 (RAID-Z2)  ::
Reply
(2016-03-09, 12:18)gjwAudio Wrote: Are there any steps you'd suggest before I nuke Thumbnails, Textures and MyVideos (aside from saving copies to an offline location, just-in-case) ?

I guess the usual suggestion might be to export your existing library but that might make matters worse (not to mention using cached artwork). The main thing is to ensure you have your artwork present and named correctly when scanning, so make sure that's done first. Going forward you shouldn't really need to change your artwork, other than with the addition of new artwork using various tools (AD, mklocal.py etc.). Removing or renaming artwork should not be required, and if any tool is doing that you need to understand why.

(2016-03-09, 12:18)gjwAudio Wrote: Is this where I dump AD, and rely on Artwork Beef alone ?

I use AD, but only for movies and only for specific artwork items (clearart and clearlogo), and never let it write into my file system.

(2016-03-09, 12:18)gjwAudio Wrote: Is my real friend going to be a Kodi-friendly media manager ?

I use Ember for movies (quite an old version, 1.3.0.20 - haven't felt the need to upgrade), and SickRage for TV shows, and haven't had any problems.
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
So clearly, this isn't a 'silver bullet' solution to the problem of fanart/backgrounds not showing up (or being corrupted). For noobs like me, I'm looking at this going "W...T...FHuh" having zzero idea how to with scripts of any kind. I'm guessing there's no easy way to get this done. May have to go back to Confluence which would suck cuz I really like the look of Mimic.
Reply
I have reinstalled everything from scratch and got the same 5 entries each scan.
I then decided to filtered my sources so I deleted my library and scan one source at a time.
The problem was files that were at the root of one of them... voila !!!! done.

I have different scripts running texturecache commands for everything I need....
THANK YOU
Reply
What is your goal ?
Is Confluence give you what you want ?


(2016-03-09, 19:46)TheCorkery Wrote: So clearly, this isn't a 'silver bullet' solution to the problem of fanart/backgrounds not showing up (or being corrupted). For noobs like me, I'm looking at this going "W...T...FHuh" having zzero idea how to with scripts of any kind. I'm guessing there's no easy way to get this done. May have to go back to Confluence which would suck cuz I really like the look of Mimic.
Reply
Hi dear Milhouse.
I just changed icon.png and fanart.jpg of a Kodi addon created by me, but I can't see the new images inside Kodi GUI: I see always the old ones.
I used texturecache:
Code:
./texturecache.py c
but I not solved the issue.
Your magnific tool works with addon images?
If not, could you advice me how to solve this issue?
Thx a lot
Reply
You need to re-cache the addon artwork:
Code:
./texturecache.py C addons <addon name>
eg.
Code:
./texturecache.py C addons youtube
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 Milhouse

I'd like to map the TCMU to the red button on my remote.

So far I think i did OK
1. put my python script in C:\Users\xxx\AppData\Roaming\Kodi\userdata\XbmcPruneCache.py
2. Edit my C:\Users\xxx\AppData\Roaming\Kodi\userdata\keymap\remote.xml and add

<Home>
<remote>
<red>RunScript("special://profile/XbmcPruneCache.py")</red>
</remote>
</Home>

XbmcPruneCache.py is calling XbmcPruneCache.bat

The bat file does various things like
- Sending a nice cleaning notification
- Delete some junks like moviename.nfo created during kodi library
- Run TCMU (prune)

Now well. when I run le py by double clicking on it in windows it is completing fine.
when I press my remote red button it starts the script but here is what I can see

http://imgur.com/gNUhwDC

It says something about import error dll. So it looks when launched from Kodi and not externally it cannot handle correcly my python install and/or path or whatever
I think it is because TCMU is not a Kodi addon something about python from Kodi install or the one I installed in windows (2.7 if i recall)
But i am a total python noob (hence my post here) so i will wait for a clever answer
Is there an easy workaround or does it really mean turning TCMU into an addon (which would be beyond my skills)
Reply
Run texturecache.py using the full system installed Python - that you would install separately, either Python 2.7.x or Python 3.3 etc. - and not the Python interpreter included with Kodi. Use "c:\path\to\full\python\python.exe texturecache.py etc." if you're having trouble finding python automatically.

The Kodi Python interpreter may be incomplete and missing modules that it doesn't need but are required by texturecache.py, The latter is only developed and tested against the full system interpreter.
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
That was quick

I think it is 64 bits 2.7.9 python i have

I tried to replace all lines calling TCMU in the .bat file so

python C:\PROGRA~2\KODISC~1\CACHEM~1\TEXTUR~1\TEXTUR~1.PY notify "Texture Cache Maintenance Utility" "Cleaning Kodi Cache..." 100000 "C://Program Files (x86)//Kodi Scripts//Cache Maintenance//cleaning.png"
python C:\PROGRA~2\KODISC~1\CACHEM~1\TEXTUR~1\TEXTUR~1.PY update
python C:\PROGRA~2\KODISC~1\CACHEM~1\TEXTUR~1\TEXTUR~1.PY P
python C:\PROGRA~2\KODISC~1\CACHEM~1\TEXTUR~1\TEXTUR~1.PY notify "Texture Cache Maintenance Utility" "Kodi Cache has been cleaned!" 2000 "C://Program Files (x86)//Kodi Scripts//Cache Maintenance//checkmark.png"

Changed to

C:\PROGRA~1\Python\python.exe C:\PROGRA~2\KODISC~1\CACHEM~1\TEXTUR~1\TEXTUR~1.PY notify "Texture Cache Maintenance Utility" "Cleaning Kodi Cache..." 100000 "C://Program Files (x86)//Kodi Scripts//Cache Maintenance//cleaning.png"
C:\PROGRA~1\Python\python.exe C:\PROGRA~2\KODISC~1\CACHEM~1\TEXTUR~1\TEXTUR~1.PY update
C:\PROGRA~1\Python\python.exe C:\PROGRA~2\KODISC~1\CACHEM~1\TEXTUR~1\TEXTUR~1.PY P
C:\PROGRA~1\Python\python.exe C:\PROGRA~2\KODISC~1\CACHEM~1\TEXTUR~1\TEXTUR~1.PY notify "Texture Cache Maintenance Utility" "Kodi Cache has been cleaned!" 2000 "C://Program Files (x86)//Kodi Scripts//Cache Maintenance//checkmark.png"

launching externally the bat or the py is fine. So windows understands.
But Kodi is still not liking it (same result import error DLL, socket.py nonsense) when launched with the remote
Reply
  • 1
  • 126
  • 127
  • 128(current)
  • 129
  • 130
  • 197

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