[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 - 2013-11-03 If you run "nc movies" it will list any movie artwork that needs to be cached. If all artwork is cached and the GUI is not fluent then the lack of fluency is not due to caching, try a lighter skin or faster storage. If you are using a Raspberry Pi, make sure you are using a build with all the latest performance enhancements/speedups. RE: [RELEASE] Texture Cache Maintenance utility - crayzee - 2013-11-03 Thank... but "nc" runs the same way then "c" :/ RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-04 Big changes, please report any problems (supplying a logfile with verbose option @logfile.verbose=yes really helps!) Version 1.0.4
RE: [RELEASE] Texture Cache Maintenance utility - ctawn - 2013-11-06 Is it possible to use this on an ATV2 (running XBMC Frodo) to remove all cached images generated by video add-ons only, and nothing else? I did read it will be required to install python 2.73, and I am fine with that. But before delving further into this, I'd like to know if it is possible and smooth enough. Specific examples would be very helpful. TIA. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-07 (2013-11-06, 23:06)ctawn Wrote: Is it possible to use this on an ATV2 (running XBMC Frodo) Possible, yes, though it's often a challenge to find the right sqlite package - there were some notes on how to accomplish this earlier in the thread, I think the OP has a link in the installation section. With the introduction of the Textures JSON API (Gotham only) it will be possible to make the dependency on sqlite3 entirely optional, so as long as you're running a recent master build you should be able to run the texturecache.py script without sqlite3 being installed. The next version of texturecache.py will support this optionality, v1.0.4 will fail to run if sqlite3 is not installed. (2013-11-06, 23:06)ctawn Wrote: to remove all cached images generated by video add-ons only, and nothing else? Sure, if you are able to identify the matching urls for the video addons, as there is nothing in the texture cache database that associates a cached image with the script, addon or library that created (or "owns") it, other than possibly some unique location or web address. Here's a few BBC iPlayer cached images that I found using the "s" (search) function - note that several columns have been removed for clarity, those shown are id, cachedurl, lasthashcheck and url: Code: # ./texturecache.py s iplayer The local artwork you probably don't want to delete, but the remote artwork you do, so search using a more complete URL that identifies only the remote artwork: Code: ./texturecache.py s http://www.bbc.co.uk/iplayer Code: ./texturecache.py d 31335 31336 31337 31338 31339 You can script this: Code: IDS=$(./texturecache.py s "http://www.bbc.co.uk/iplayer" 2>&1 1>/dev/null | grep "Matching row ids" | cut -b19-) then run it as often as you like, maybe under cron. You could also return just the iplayer artwork which hasn't been hashed (possibly indicative of it being temporary/transient), eg. Code: ./texturecache.py x 'where lasthashcheck = "" and url like "%iplayer%"' Should you delete any addon artwork that you meant to keep, just re-cache it (./texturecache.py c addons), or leave it to be re-cached automatically as you browse the GUI. Is that specific enough for you? RE: [RELEASE] Texture Cache Maintenance utility - tinybutstrong - 2013-11-07 Thanks for this tool, finally I fixed the artwork display for few movies in my library. (I hope XBMC team fix it in future releases) I have a small issue, not sure if it isn't supported by the script or my fault. Using your example, I did: Code: python "c:\folder\texturecache.py" C movies "Dr. No" Good, now I see the updated disc, clearart, logo, etc. But XBMC still using the old disc art image for collections/sets in library view, check screenshot bellow (Ace skin right list mode): (number 1, 2, 3 are the old images) How I can fix it? Command bellow also doesn't updated the stacked disc art display: Code: python "c:\folder\texturecache.py" C sets ps: Frodo v12.2 ============== Update: Okay, checking the reference is database I found both images: 1 = the old one 2 = new I don't want to edit/replace manually because there is a file with same name, but different size in each folder: c7c13898.dds, c7c13898.dds I don't know how to generate that kind of file. Found this info in Wiki. If I just delete both file in folder, XBMC will re-cache them? ok I tried here, XBMC isn't loading the image now. Restored. Okay, I managed to fix the disc art display, for some reason there is two entry for each movie. I edited the field pointing to the correct image: Your prune feature is amazing, the thumbnails folder decreased 85%! How can XBMC team not implementing an auto prune? In few month it accumulate a lot of garbage. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-07 (2013-11-07, 11:46)tinybutstrong Wrote: If I just delete both file in folder, XBMC will re-cache them? ok I tried here, XBMC isn't loading the image now. Restored. Why did you blank out the filenames in your image of the database rows, that might have been useful in determining what is going on as it looks like one discart has a forward slash, the other a backward slash. If you want to send me your Video and Texture databases I can try taking one last look at resolving any remaining issues with mangled filenames, as I suspect that is your problem. Edit: I've just noticed you also have two each of clearart and logo images, one with a forward slash the other with a backslash, chances are XBMC is still using the "old" clearart/logo images. I can only imagine you've used an addon that has knackered your urls in a similar way to Movie Set Artwork Automator (now fixed) - maybe contact the addon maintainer about that. Send me your databases and I'll see if I can work around it (though thought I had last time, will be interesting to see what is in your MyVideo db). Edit2: It's a problem with your sets, right? Try running the following: Code: python "c:\folder\texturecache.py" C sets "007" @logfile=c:\tc.log @logfile.verbose=yes RE: [RELEASE] Texture Cache Maintenance utility - ctawn - 2013-11-07 Thanks, that's very specific. Especially that whole grep bit. Can you specify a range of IDs? I also wonder about the unhashed bit, too. Could that be a way to purge all the temp images right there? Would it ever get important images, like fan art or posters or TV episodes? RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-07 (2013-11-07, 21:39)ctawn Wrote: Can you specify a range of IDs? The script doesn't support a range, but does support multiple ids, so you could construct a range of id's in a script and then pass them in as arguments, but I'm not entirely sure why you'd want to do that. If you really want to delete a specific range, try the query "where id >= 100 and id <= 200" on the x option, and you'll get all the ids between 100 and 200 (if there are any). (2013-11-07, 21:39)ctawn Wrote: I also wonder about the unhashed bit, too. Could that be a way to purge all the temp images right there? Would it ever get important images, like fan art or posters or TV episodes? It's possibly a way of identifying temporary artwork, but it's not something I've looked into in order to confirm this behaviour so it may also clobber images you want to keep. You could find all ids with no hash and delete them using the "x" option, but just be aware that the current JSON API doesn't support filtering by empty string and will return every row with or without a hash so force @dbjson=no for now. RE: [RELEASE] Texture Cache Maintenance utility - ctawn - 2013-11-07 ok, i installed python 2.73 and your script, and ran a search But i get this message: Quote:FATAL: The task you wish to perform requires that the JSON-RPC server is enabled and running on the XBMC system you wish to connect. What does that mean? I have the remote control options enabled in XBMC. But what do I do about JSON-RPC server? Also, if I can get that to work, can't I query by the class 'addon' to do what I am looking for (delete all images from add ons)? Thanks. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-07 Add "@dbjson=no" to the command line, but for whatever reason it can't connect to the RPC service on your client so check you've specified an xbmc.host. Sometimes the RPC service will crash, so try restarting XBMC. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-08 Missed this off my previous reply. (2013-11-07, 22:21)ctawn Wrote: Also, if I can get that to work, can't I query by the class 'addon' to do what I am looking for (delete all images from add ons)? You can, but it will only delete those images the addon has registered in the media library, which is usually just a "thumb". You can see the artwork associated with your addons by running "jd addons", it won't be much. The vast majority of the artwork that is stored in the thumbnails cache by an addon has no direct relationship back to that addon. The best hope you have is a unique url, as previously mentioned. RE: [RELEASE] Texture Cache Maintenance utility - ctawn - 2013-11-08 (2013-11-07, 22:25)MilhouseVH Wrote: Add "@dbjson=no" to the command line, but for whatever reason it can't connect to the RPC service on your client so check you've specified an xbmc.host. Sorry, where do I specify that? RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-08 (2013-11-08, 18:55)ctawn Wrote: Sorry, where do I specify that?On the command line, eg: Code: ./texturecache.py @dbjson=no c movies or so it becomes a default setting and you don't need to specify it on the command line each time, create a file called texturecache.cfg and add the line: Code: dbjson=no Edit: If you were referring to xbmc.host, since you're running this on ATV2 it should default to localhost using rpc.port 9090 so no need to specify it explicitly. RE: [RELEASE] Texture Cache Maintenance utility - ctawn - 2013-11-09 ok, thanks for the hand holding here. I got this now: Quote:ATV:/bin root# ./texturecache.py @dbjson=no s youtube I don't know if this is an issue with the SQlite installation you mentioned on the ATV, or a path issue. On iOS, that file is located here: /User/Library/Preferences/XBMC/userdata/Database/Textures13.db |