[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) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-11-08 You've misunderstood the purpose of the "missing" option. The "missing" option uses JSON to "walk" your file system (ie. one or more sources) to find movies or tv episodes that are *not* present in your media library (ie. finding files that are "missing" from your media library). Kodi needs access to the file system in order for this option to work - the media library is read first, then the file system is walked or "traversed" and with your movieshare2 source being dead Kodi is most likely returning an error of some kind when trying to access the file system as it no longer exists. The "missing" option does not tell you which media items are no longer accessible in your file system, and is not the option you require. In fact, there isn't really an option for what you require, although you could try: Code: ./texturecache.py query movies 'file startswith nfs://192.168.178.29/volume2/movieshare2' which should list all the movies you had on that path. RE: [RELEASE] Texture Cache Maintenance utility - theowiesengrund - 2014-11-08 Thank You! Exactly what i needed! RE: [RELEASE] Texture Cache Maintenance utility - McButton - 2014-11-15 Maybe I just don't understand what I'm doing.. If I have like 30 corrupt images... For instance, no matter what I delete or reload or wipe, when the movies scrape, they are empty; Wouldn't it just be easiest to delete the images folder & textures file? I looked through the tutorial, and it seems I'd have to type coding for each movie. I'm not completely tech savvy, but I can ...figure...stuff...out... Even if I delete the folders, it seems like the system freaks out for a bit before it fully recovers all images properly. It's not instant. I always have to reset several times. Or, does this just run and auto grab all my errors? I've looked at this for a while, and still don't quite grasp it. Any tips? RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-11-15 It (the script) can't recognise corruption (assuming you're referring to visual artefacts in your cached images) although such corruption would suggest some sort of system instability. Your option is to either a) delete individual artwork (using s/d) and then re-cache ( c ) - time consuming for 30 images, b) force re-cache individual movies (C movies <movie-name>) - again potentially time consuming or c) cut your losses and nuke the cache then re-cache ( c ) which may still take a while but at least you can do something else while it runs. However it sounds like you've got a fundamental problem with your system that is causing all this corruption in the first place, and fixing that should be your priority. RE: [RELEASE] Texture Cache Maintenance utility - atv2xbmcuser - 2014-11-23 Hi all, can I use the texturecache.py utility to generate all thumbnails of my (home) videos and photos that are stored on my NAS and linked to xbmc via smb protocol? If I use "./texturecache.py nc video", the script returns Cache pre-load activity summary for "movies/sets/tvshows": | fanart | poster | thumb | TOTAL --------------+-------------+-------------+-------------+------------- Cached | - | - | - | 0 Deleted | - | - | - | 0 Duplicate | - | - | - | 0 Error | - | - | - | 0 Ignored | - | - | - | 0 Season-all | - | - | - | 0 Skipped | - | - | - | 0 Undefined | - | - | - | 0 ====================================================================== TOTAL | - | - | - | 0 Loading: 00:00:00.70 Parsing: 00:00:00.00 TOTAL RUNTIME: 00:00:00.74 I'm using openelec 4.2.1 on a Raspberry Pi. Thanks for any hint RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-11-23 (2014-11-23, 11:23)atv2xbmcuser Wrote: can I use the texturecache.py utility to generate all thumbnails of my (home) videos and photos that are stored on my NAS and linked to xbmc via smb protocol? You can only pre-load the cache with artwork for videos that are present in your media library (ie. movies, tvshows, movie sets). Photos can't be pre-cached as they don't exist in the media library. I don't know anything about home videos, I'm assuming these aren't in your library and that you're just accessing them as Files, so it's unlikely there's anything this script can do for you. RE: [RELEASE] Texture Cache Maintenance utility - vbat99 - 2014-11-27 Hi Milhouse Still been using your texturecache script to put my TV to sleep, but with some commits included and then removed again (miappa's Helix builds), I've got a weird situation, where some times, either the Pi won't put the TV to sleep, or other times when the PI wakes the Tv from standby, the pi freezes. Weirdiest, is the USB IR receivers red LED locks on lit. Could you have a squiz through my texturecache debug output, see if anything stands out as wrong? http://pastebin.com/yQ6y94eb What I find is after a reboot, Pi will suspend the TV once, and wake it once with no issues. It's the second wake of the Tv that things trip up. Understand if your busy, just let it slide. Cheers. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-11-27 It looks like the mytv.sh (bin.ceccontrol) script doesn't finish when called for the 5th time (off, on, off, on, off <-- doesn't finish), so I'm guessing the log corresponds to one of those times when it didn't put the TV to sleep. Presumably the mytv.sh script is interacting with cec-client, and it's this that is hanging, so the TV isn't turned off (or back on) and the mytv.sh script never completes. Unfortunately cec-client is known to cause problems and there really needs to be better CEC/JSON support in Kodi to avoid breaking the Kodi CEC comms. Someone wrote an addon that implements a couple of basic CEC methods with JSON support (TV on/off, I think), are you using this addon as it may be more reliable than calling cec-client. Edit: See here for addon. RE: [RELEASE] Texture Cache Maintenance utility - vbat99 - 2014-11-27 No, not using that addon, but will look into it. the mytv.sh script contains Code: #!/bin/bash I'll look at the addon, see what can be done. Thanks RE: [RELEASE] Texture Cache Maintenance utility - axbmcuser - 2014-11-28 Thanks for this great utility! Maybe someone can give me a hint regarding my following problem. Having one folder for each video, i recently changed my poster-filenames from: Video1Name/poster.jpg to: Video1Name/Video1Name-poster.jpg Now in the library all art.poster entries are still [...]/poster.jpg insted of what they should be now [...]/[...]-poster.jpg. What can i do so my library gets the new poster filenames? I tried cleaning and rescanning, but that did not do the trick. If i rename one of the video-folders from "Video1Name" to "Video1NameTest" for example, everything is fine for this folder. But thats not a solution. :-) Thanks in advance! RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-11-28 Cleaning/Rescanning won't work, you'll need to drop your entire database and re-scrape for it to pick up your changes. That's why Video1NameTest works. You can however use mklocal.py to update your library with the updated artwork filenames - it will run through your media library and correct any local artwork filenames. Try something like: Code: texturecache.py jd movies >movies.dat Change the --local and --prefix arguments to suit your setup - --local is the OS path for your media, --prefix is how this media is accessed by Kodi. Specify whatever artwork types you want to process using the --artwork argument. The --readonly argument means that no remote artwork will be downloaded and stored locally, only your existing local artwork will be processed. Once you have run the above, look at the contents of the changes.dat file to see if the proposed changes make sense - it should be replacing your */poster.jpg filenames with */*-poster.jpg. To apply the changes to your media library, run the following command (in Gotham this can be very slow, but a lot quicker in Helix): Code: cat changes.dat | texturecache.py set You may then want to re-cache the new artwork once the new filenames have been applied (texturecache.py c movies). RE: [RELEASE] Texture Cache Maintenance utility - axbmcuser - 2014-11-28 Thank you very much! I will give it a try. After some sleep. Good night. RE: [RELEASE] Texture Cache Maintenance utility - axbmcuser - 2014-11-28 Addition question: Can mklocal.py handle characters like ü ö ä? I get Code: "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 54: ordinal not in range(128)" RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-11-28 Blast. Can you upload/PM your movies.dat file. Also, if you add --verbose to the mklocal.py command line it would be useful to have a copy of the console output. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-11-28 Thanks for the PM. I've just pushed an update to mklocal.py, you'll need to download it again (v0.2.4 - it's mentioned near the top of the source code). From the information you sent me, I don't see the script finding your *-poster.jpg artwork, but as it was only a snippet maybe the movie details you sent me didn't have the new *-poster.jpg artwork. Anyway, what follows is a description of what you should be seeing, using a variation of the data you sent me... Assuming you've got a movie in your library with the following artwork: Code: $ cat movies.dat And you've got the following new *-poster.jpg/*-fanart.jpg artwork for this movie: Code: $ ls -la "/freenas/media/Test/Blutzbrüdaz (2012)" Then you should be seeing something very similar to what follows when running mklocal.py: Code: $ cat movies.dat | tools/mklocal.py --local /freenas/media --prefix nfs://192.168.0.3/mnt/share/media --artwork poster fanart --readonly --verbose --output changes.dat If you're not seeing the script detect your new fanart ("Changing library value to:" etc.) then there's a problem (paste me the debug and the contents of the movie folder). Note that I neglected to mention you will need the "--output changes.dat" argument passed to mklocal.py to create the changes.dat file. In changes.dat, you should now have... Code: [ which when fed into "texturecache.py set" will update the movie with the new artwork filenames. |