[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 - redglory - 2014-02-02 Same here! Sorry for my late test. Running Code: python TextureCache.py c all with: Code: cache.extrafanart=yes Will post results tomorrow (1:30 am here ) EDIT: Ok, done! Results: Code: Threads Used: 10 Do you need any info on my tc.log? RE: [RELEASE] Texture Cache Maintenance utility - jnapieralski - 2014-02-02 Hello, I keep getting this error when running the script: Code: libEpisodes.ERROR: JSON response has no result! Is one of the TV Shows in my db reporting that it contains -1 episodes? Am I reading that right? Any thoughts on steps to resolve would be appreciated! RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2014-02-02 Perhaps you could try to clean you media db and run script again? maybe you have your db screwed up?! RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-02-02 (2014-02-02, 15:36)jnapieralski Wrote: Is one of the TV Shows in my db reporting that it contains -1 episodes? Am I reading that right? Yes, it's an error in the database (the tv show actually thinks it has a season -1). You'll need to remove the offending show and re-add it, though identifying which show is responsible is a problem (I'll add a warning in the next version). For now you'll probably need to dump each show in turn (./texturecache.py jd tvshows "tvshowname") and see which one crashes the script, then remove that show and re-add it. RE: [RELEASE] Texture Cache Maintenance utility - jnapieralski - 2014-02-02 Well, this ought to be fun. It's times like these that I wish I was halfway competent in bash. Thanks very much for the quick response, MilhouseVH! RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-02-02 If you enable the logfile while dumping all your tvshows (... jd tvshows @logfile=filename), you might be able to work out the name of the tv show being processed when the error occurs by looking at the last few entries in the logfile. RE: [RELEASE] Texture Cache Maintenance utility - jnapieralski - 2014-02-02 (2014-02-02, 16:32)MilhouseVH Wrote: If you enable the logfile while dumping all your tvshows... Excellent! Worked perfectly-- found the offending show, and sure enough, the db had several episodes in "Season -1." I cleaned up, and everything's chugging along nicely now. Great work on the script, and thanks for all the help! RE: [RELEASE] Texture Cache Maintenance utility - theowiesengrund - 2014-02-02 I wasn't successful. Tried "nc" option afterwards, but the log just ends without any statement. Console output is the following: Code: Write failed: Broken pipe 3 of 16 [unmatched 26235: matched 0, skipped 3718] (1301 of 4324) RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-02-02 (2014-02-02, 18:19)theowiesengrund Wrote: I wasn't successful. Tried "nc" option afterwards, but the log just ends without any statement. Broken pipe? Where you piping the output from texturecache.py into another command? Can you PM me the log? It would be worth running bcmstat.sh (options "xgcd10") concurrently to keep an eye on your free memory - if it goes below 100MB free then I'd be surprised. I tested your db libraries, and didn't have a problem while using chunked=yes. Hmmm... RE: [RELEASE] Texture Cache Maintenance utility - CrazyCanuck - 2014-02-04 Hi, Thanks for sharing this utility. Very handy. I do have a question for you, however. If I run using s option with spaces in string "Let It Be" should script URL encode to match with url that contains "Let%20It%20Be"? Your "Dr. No" example seems to imply that it does, but my results seem to show otherwise. Thanks. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-02-04 (2014-02-04, 03:55)CrazyCanuck Wrote: I do have a question for you, however. If I run using s option with spaces in string "Let It Be" should script URL encode to match with url that contains "Let%20It%20Be"? Your "Dr. No" example seems to imply that it does, but my results seem to show otherwise. The search string doesn't need to be encoded as the Textures13 url data is not encoded when stored in the Textures13 database. I'm not sure what you mean about the "Dr. No" example implying the query should be encoded - in the first post of this thread I'm not showing the query results in encoded form, if I have done elsewhere let me know and I'll correct that! RE: [RELEASE] Texture Cache Maintenance utility - CrazyCanuck - 2014-02-04 Odd, I'm not home right now to verify but I'm pretty sure s option query returned url data as encoded. I'm using RPi Openelec 3.2.4. Also, not sure if it makes a difference but my URLs are smb and not nfs. The reason I came across this is that a query on Let It Be would not return any results, yet Let%20It%20Be did. Also, is there a way to delete and re-cache album art (C option) using url as filter. From what I understand my option is to use albums class with filter, but this seems to only filter on albums with filter value in name as opposed to somewhere in path. So in my particular example I would like to re-cache all album art for the artist Beatles and not just artist art or just albums with Beatles in name (e.g. With The Beatles). Hopefully this makes sense. Thanks again. RE: [RELEASE] Texture Cache Maintenance utility - CrazyCanuck - 2014-02-04 Looking at this a bit more closely, could I achieve it by saving output of s "Beatles" to shell variable. Then run d option on this set or row ids. And then finally run c to re-cache what I just deleted? Like this: Code: IDS=$(./texturecache.py s "Beatles" 2>&1 1>/dev/null | cut -b71-) Also, in a similar example you give in the first post Code: IDS=$(./texturecache.py s "size=thumb" 2>&1 1>/dev/null | cut -b19-) You're cutting first 18 bytes; however, output seems to have more characters before first row ID is outputted. Perhaps your output has changed since the first post? I used -b71- to get first row ID of results. Thanks. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-02-04 (2014-02-04, 18:28)CrazyCanuck Wrote: Odd, I'm not home right now to verify but I'm pretty sure s option query returned url data as encoded. I'm using RPi Openelec 3.2.4. Also, not sure if it makes a difference but my URLs are smb and not nfs. The reason I came across this is that a query on Let It Be would not return any results, yet Let%20It%20Be did. I've very occasionally seen url encoded data in Textures13.db (3 such rows out of 30,000) but I've no idea how they got there and presumed it was an error. If you can reliably reproduce url encoded data in Textures13.db that would be interesting, but as a rule I'm not seeing this with Frodo 3.2.4 or Gotham, and any such urls are wrong. (2014-02-04, 18:28)CrazyCanuck Wrote: Also, is there a way to delete and re-cache album art (C option) using url as filter. Not directly, no. (2014-02-04, 18:28)CrazyCanuck Wrote: From what I understand my option is to use albums class with filter, but this seems to only filter on albums with filter value in name as opposed to somewhere in path. So in my particular example I would like to re-cache all album art for the artist Beatles and not just artist art or just albums with Beatles in name (e.g. With The Beatles). Hopefully this makes sense. You could try something like "purge all /beatles/" to remove just your Beatles artwork from the cache (the pattern used assumes all your Beatles music is stored within a "Beatles" folder), followed by "c albums" / "c artists" to re-cache any album/artist artwork that is now missing from the cache (ie. the Beatles artwork you just deleted with the purge option). However I've added a change to the next version I'll be releasing which will allow you to filter on a field other than the default "title", eg. "jd movies 'james cameron' @filter=director" would allow you to view details of all your movies directed by James Cameron, and "C albums 'the\ beatles' @filter=artist" would re-cache just your Beatles albums. If you are having a problem with a filter matching both "Beatles" and "With The Beatles" - you want the former but not the latter - then (in this future release) setting "@filter.operator=is" will ensure the filter matches on "Beatles" exactly (though still case-insensitive). Any of the standard filter operators can be specified, eg. "jd movies cameron @filter=director @filter.operator=startswith" would return movies directed by Cameron Crow, but not James Cameron (the default @filter.operator is "contains"). RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-02-04 (2014-02-04, 18:42)CrazyCanuck Wrote: Also, in a similar example you give in the first post On reflection, sed is probably safest... Code: ./texturecache.py s "size=thumb" 2>&1 1>/dev/null | sed "s/.*: //" I've updated the first post, thanks. |