[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 - 2016-11-18 You need to at least enable debug logging.. "special://thumbnails" should map to your ~/.kodi/userdata/Thumbnails folder - have you checked if the files are actually there? Sometimes Kodi will return an error when "downloading" (ie. caching) artwork which results in the script believing the artwork couldn't be cached, but Kodi does in fact successfully cache the artwork, so it's possibly a false negative - search your cache to see if the artwork has actually been cached, ie.: Code: texturecache.py s tt0066206_fanart.gif Alternatively: Code: texturecache.py nc movies Patton will list any artwork for the movie "Patton" that remains uncached, so if this lists your gifs then it's definitely not being cached. It's also possible that Kodi simply cannot cache gif artwork - it's not really a format I'm familiar with. If you can view the GIF artwork in the Kodi GUI, but the artwork remains uncached (as far as this script is concerned) then Kodi isn't caching GIF artwork, or it's caching GIF artwork differently to how it caches non-GIF artwork. RE: [RELEASE] Texture Cache Maintenance utility - Simorgh - 2016-11-18 This is texturecache.cfg: Code: #userdata = ~/.xbmc/userdata/ I restarted the machine and connected the HDMI cable and the error went away. the log is like this now: Code: 15:56:55 34.077522 T:1956869040 NOTICE: Running the application... On one of my machine I installed Aeon MQ 7, and that is probably why it has started to download animated posters and gifs. but why can't it get them I am wondering. RE: [RELEASE] Texture Cache Maintenance utility - Simorgh - 2016-11-18 IGNORE this post. I realized that I can't have full path in 'thumbnails = ' Code: ./texturecache.py r I had /home/osmc/.kodi/userdata/ before, but then I changed it in the .cfg file to ~/.kodi/userdata/ But as you see, it now has both. does the script somehow save it somewhere beside the .cfg file? RE: [RELEASE] Texture Cache Maintenance utility - Simorgh - 2016-11-18 (2016-11-18, 00:05)Milhouse Wrote: You need to at least enable debug logging.. Where can I set it so special://thumbnails point to ~/.kodi/userdata/Thumbnails folder? (2016-11-18, 00:05)Milhouse Wrote: Sometimes Kodi will return an error when "downloading" (ie. caching) artwork which results in the script believing the artwork couldn't be cached, but Kodi does in fact successfully cache the artwork, so it's possibly a false negative - search your cache to see if the artwork has actually been cached, ie.: Code: Cosmc@SimorghOSMC:~$ ./texturecache.py s tt0066206_fanart.gif (2016-11-18, 00:05)Milhouse Wrote: Alternatively: Code: osmc@SimorghOSMC:~$ ./texturecache.py nc movies Patton I don't know if I have screwed things or what. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2016-11-18 (2016-11-18, 01:28)Simorgh Wrote: Where can I set it so special://thumbnails point to ~/.kodi/userdata/Thumbnails folder? The path ("special://thumbnails/blah") is configured in your media libary and has been set by something, an add-on presumably. If you want to change the path you need to reconfigure the add-on that is adding this GIF artwork to your media library. That said, "special://thumbnails" should already map to "~/.kodi/userdata/Thumbnails" within Kodi, so I'm not entirely sure what you hope to gain by changing the path. Changing the "thumbnails" folder property in texturecache.cfg will also have no effect on the caching option, as it doesn't use this property. This property applies only to something like the "r" option which does require direct file system access, and in this case the "thumbnails" property is usually relative to the "userdata" property. However as you are using OSMC, you shouldn't need to configure any path - not userdata, thumbnails or dbfile. Just leave them as their default values (ie. don't include them in your texturecache.cfg) and the script will work fine. (2016-11-18, 01:28)Simorgh Wrote: I don't know if I have screwed things or what. I just don't think Kodi wants to cache GIF artwork, in which case there's really not much you can do other than to add the following to texturecache.cfg: Code: cache.ignore.types=+.*.gif$ RE: [RELEASE] Texture Cache Maintenance utility - Simorgh - 2016-11-18 @Milhouse Thank you for your time. I think I understand what is happening here. But maybe you can help me too. (I am not a computer savvy person and I learn slow) My RPi3 (10.0.1.120) runs OSMC and is the MySQL server. I have 3 other RPi2's (running LibreELEC) in the house and they are all bringing the database off of the RPi3. The texturecache.py script is on the RPi3 (10.0.1.120). Yesterday, I installed Aeon MQ 7 skin on one of the RPi2 (10.0.1.122). And the movie library on that skin obviously uses the animated GIFs, I have seen the poster animation while browsing the library. I logged into that RPi2 and looked inside the Thumbnails/ folder and there it was, a folder named animatedgifs/ and the file you asked me to run the following command is actually in there: Code: texturecache.py s tt0066206_fanart.gif Code: SimorghLibr:~/.kodi/userdata/Thumbnails/animatedgifs # ls -la tt0066206_fanart.gif The reason that texturesache.py can't cache those animated GIFs, can it be that I have to identify the 10.0.1.122 machine in the .cfg file as client or something?! Once again thank you for you detailed explanations. Appreciated. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2016-11-18 (2016-11-18, 05:00)Simorgh Wrote: The reason that texturesache.py can't cache those animated GIFs, can it be that I have to identify the 10.0.1.122 machine in the .cfg file as client or something?! Sort of, yes. The problem is that you're using a shared library which references GIF artwork that is only accessible to one client (10.0.1.122) and not your other clients because the path you're using for the GIFs maps to a local path rather than a networked path. When you cache the library on any of your clients, each client is going to see (via the library) that these GIFs are associated with the movie and need to be cached, but only 10.0.1.122 has any chance of caching these files which don't exist on your other two clients. So you'll get "can't download" errors on the two clients that physically can't access the GIF files. Your solutions are to: 1) ignore GIFs on the two clients other than 10.0.1.122 by using a suitable "cache.ignore.types" pattern (eg. ".*/animatedgifs/.*.gif$" should work, ignoring any gifs in the animatedgifs folder) 2) use a network resource as the location of the GIFs instead of burying them in the local Thumbnails folder, so that all your clients can physically access (and therefore cache) them Assuming you have no plans to deploy Aeon MQ 7 to your other two clients, #1 is the easiest solution. Let's say you're running texturecache.py on your RPi3 server (without GIFs), and you have a lounge client (Aeon MQ 7 with local GIFs) and a bedroom client (Estuary skin, with no GIFs). Your texturecache.cfg should look something like: Code: # Common properties go here and now you can use "texturecache.py @section=lounge c movies" to cache everything including those gifs (assuming Kodi is willing to cache gifs - still no idea on that), and "texturecache.py @section=bedroom c movies" to cache everything apart from gifs. RE: [RELEASE] Texture Cache Maintenance utility - firewater - 2016-11-28 Sorry, this has probably been asked a million times, but I've tried using the search function on this thread and I'm not finding any cases exactly like mine: I add all movies and series by manually making the .nfo files. I update them with plot, director, and so on, after so time and want them all to be refreshed at once, instead of having to retort to contex menu > information > refresh for each item. It seems that this addon can do this, right? Seems to be my last hope... I believe the script would have to do something with "qa.nfo.refresh", but I don't know what to write beside that... I'd be running this script with Kodi's autoexec.py, if it matters. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2016-11-28 Code: texturecache.py qax movies @qaperiod=-1 @qa.nfo.refresh=999999 would refresh all movies (technically, it will remove from the library any media file associated with an nfo that has been modified in the previous 999999 days, then rescan the media file). Replace "movies" with "tvshows" to refresh tvshows (ie. episodes), although it won't remove remove/refresh tvshow.nfo files for obvious reasons (it would mean deleting all your seasons and episodes). However if you're refreshing everything, why not just delete MyVideos and rescan the library? You can backup/restore watched statuses with: Code: texturecache.py watched movies backup movies.dat RE: [RELEASE] Texture Cache Maintenance utility - firewater - 2016-12-01 Thank you very much. What I don't get is how I am to execute the texturecache.py script. I tried making a separate runtexturecache.py script that contained the lines you gave me and running it with Kodi Callbacks plugin, but syntax error appears and it doesn't work. Is this syntax for Kodi, Python, or some sort of command line? RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2016-12-01 (2016-12-01, 07:24)firewater Wrote: Thank you very much. What I don't get is how I am to execute the texturecache.py script. I tried making a separate runtexturecache.py script that contained the lines you gave me and running it with Kodi Callbacks plugin, but syntax error appears and it doesn't work. Is this syntax for Kodi, Python, or some sort of command line? Command line. RE: [RELEASE] Texture Cache Maintenance utility - Glorious1 - 2016-12-02 Hi, I've been dipping my toes into texturecache.py the last week or so. Thank you Milhouse for this powerful program. I've managed to learn enough to get things going, but some things still elude me. 1. It would be easiest if I can run it remotely (from a MacBook to a Kodi installation on a Mac Mini). I've got that to work by specifying kodi.hosts=192.168.0.101 in the config file, but as noted in several posts, access to the Thumbnails folder is trickier. I should have no trouble giving an absolute path to the Thumbnails folder on the Mini, but the format eludes me. If I give anything not preceded by '/', it gets treated as a relative path. But these don't work: thumbnails=/192.168.0.101/Users/jim/Library/Application Support/Kodi/userdata/Thumbnails thumbnails=/afp://192.168.0.101/Users/jim/Library/Application Support/Kodi/userdata/Thumbnails Am I missing some syntax issue? Also, I don't understand why just Thumbnails relative to userdata doesn't work, as it works for the Database. 2. Apparently Kodi has to be running so the webserver is running for any of this to work? I tried the 'wake' command, that seems to only wake the computer. Is there an easy command line way to start Kodi on the Mini? Having to go through Screen Sharing is sometimes tedious. 3. I've put new logo.png files in the source folders of many movies (all of the artwork is local). To replace the previous ones, I did ./texturecache.py C movies a. is there a way to specify only one type of artwork to re-cache? b. Although the output indicated a bunch of logos were recached, Kodi (or the skin, Nebula), often didn't update them. Artwork Downloader solo showed that it "downloaded" a new logo, but still the old one showed in the skin. Not until I used Artwork Downloader GUI for the movie, and selected the logo, then the new logo showed up. Enough for now! Thanks. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2016-12-03 1. The thumbnails property is a relative path to the userdata folder/property. Mount your userdata folder, and then specify the absolute path to your mounted userdata folder in the userdata property. There's no need to change the thumbnails property. The thumbnails property exists because some users wanted to be able to specify an alternative/non-standard Thumbnails folder name. I think. 2. Yes. The webserver is only needed for caching. Use ssh to stop/start processes on a remote machine. 3a. "@cache.artwork=poster,fanart" would cache only poster and fanart artwork. 3b. Can't really help with third-party skin issues. However if the new logo is correctly associated with the movie, and the new logo is in the cache, then I can only imagine it's some issue caused by OS file caching which can happen if you recently viewed the old logo in the Kodi GUI - restart the PC or wait some time (a few minutes) and the changed artwork will appear. RE: [RELEASE] Texture Cache Maintenance utility - Simorgh - 2016-12-03 Hi @Milhouse Thank you for all your help and support. I have been away and came back today to see if I can fix my issue. The challenge is that I have a RPi in the basement and a laptop that can not use my main WiFi router hence they are on a Netgear Extender which does not have an option to dedicate a static IP for the devices it connects. Therefore I can not use the options you mentioed in post #2077 http://forum.kodi.tv/showthread.php?tid=158373&pid=2458718#pid2458718 So I deactivated the animated art option in my bedroom RPi2 (skin: Aeon MQ 7) and deleted the /animatedgifs/ folder, restarted and it loaded up creating the /animatedgifs/ but with no files in it. Should I now delete my Textures13.db file in my RPi3 (server) and run texturecache again? If so, which string(s) should I run so that would be the best? (2016-11-18, 06:10)Milhouse Wrote: Your solutions are to: By the way I am interested in option #2 as well. Just for the future. How do I use a network resource as the location of the GIFs? Thank you in advance. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2016-12-04 (2016-12-03, 22:36)Simorgh Wrote: So I deactivated the animated art option in my bedroom RPi2 (skin: Aeon MQ 7) and deleted the /animatedgifs/ folder, restarted and it loaded up creating the /animatedgifs/ but with no files in it. If it's just an empty folder, why worry about it? (2016-12-03, 22:36)Simorgh Wrote: By the way I am interested in option #2 as well. Just for the future. How do I use a network resource as the location of the GIFs? You need to configure the GIF location using a network path - eg. nfs://, smb://, etc. Whether this is even possible needs to be answered by the author of the add-on or skin that is creating/using the animated gifs. |