[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 - ScorpioJonesy - 2018-12-01 Is there anything special that needs to be done if using a central MYSQL server? I run the script with mostly defaults and when cache moveis I get errors such as.. Environment info: MYSQL DB (same machine as Kodi and the script) Windows 10 My texturecache config is this... xbmc.host = localhost webserver.port = 8080 webserver.username = xxxx webserver.password = xxxx download.threads = 40 allow.recacheall=yes logfile = c:\temp\texturecache.log ran .\texturecache.py c movies then every movies has an error similar to 2018-12-01 08:44:01.634171:MainThread: ERROR ITEM: {4, "movies", "poster", "Zero Dark Thirty", None, None, "C:\Upload\xbmc_videodb_2015-11-22\movies\Zero_Dark_Thirty_2012-poster.jpg", 0, None, 471, False} I don't know why it has "C:\Upload\xbmc_videodb_2015-11-22" in the path? RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2018-12-01 (2018-12-01, 10:58)ScorpioJonesy Wrote: Is there anything special that needs to be done if using a central MYSQL server? No. (2018-12-01, 10:58)ScorpioJonesy Wrote: I don't know why it has "C:\Upload\xbmc_videodb_2015-11-22" in the path? Because that's the artwork path you have in your MySQL video library - presumably that's where you scraped the artwork from, or exported/imported it to/from. Try running .\texturecache.py jd movies "Zero Dark Thirty" and you'll see the artwork paths being used by the movie. If the paths are incorrect you'll need to fix them - have a look at the mklocal.py link at the foot of the first post as it can help get your artwork back in order.
RE: [RELEASE] Texture Cache Maintenance utility - ScorpioJonesy - 2018-12-04 (2018-12-01, 20:27)Milhouse Wrote:Thanks for the info, I did some checking using the script and it seems something had gone wrong with the library so I did a full reset and rescan. All looking good again now.(2018-12-01, 10:58)ScorpioJonesy Wrote: Is there anything special that needs to be done if using a central MYSQL server? RE: [RELEASE] Texture Cache Maintenance utility - Mr.Floppy - 2018-12-12 (2017-10-29, 17:47)Mr.Floppy Wrote:@Milhouse:(2017-10-15, 06:25)Mr.Floppy Wrote:(2016-02-02, 16:10)Milhouse Wrote: Ah right, you don't want to execute this script in the context of the Kodi process. Since upgrading from KODI v17.6 to KODI v18 (RC2), the solution I posted above doesn't work under Windows 7 anymore, it seems that texturecache.py isn't compatible with this KODI version and OS :-( The shell.py from above itself does work, I tested it with the following simple shell script callled "test.sh": #!/bin/bash echo -en "\007" c:/Users/Stefan/AppData/Roaming/Kodi/userdata/scripts/texturecache.py volume mute When calling this example script via shell.py by "RunScript(special://userdata/scripts/shell.py,./test.sh)", I can hear the "beep" sound coming from the first command line, but the second one does nothing (it should mute the volume and invoke the corresponding "muted speaker" symbol on the KODI screen). Testing the same example under my other KODI 18 RC2 installations using LibreElec on Android TV Box and RaspberryPi, it works without any problems - under KODI v17.6 it worked under Windows 7, too. Could you please fix it? Thank you in advance! RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2018-12-12 @Mr.Floppy: test calling texturecache.py directly from the command line, maybe you're missing a PATH entry for the Python executable. I'm pretty sure the script works fine on Windows providing your Windows system is configured correctly. RE: [RELEASE] Texture Cache Maintenance utility - Mr.Floppy - 2018-12-13 @Milhouse I tested it directly from the command line in windows 7, and it worked, yeah, but I have no clue why it doesn't work directly in KODI 18 RC2 via the "RunScript" method , since it DID work under KODI v17.6 this way and I didn't change anything regarding Windows 7 since then... Okay, let's try further simple examples: RunScript(special://userdata/scripts/shell.py,./texturecache.py,volume mute) -> nothing happens (in KODI v17.6 it worked this way) But when I use my own python script "test.py" #!/usr/bin/env python # -*- encoding: utf-8 -*- import os, sys, time c = int(sys.argv[1]) for z in range(0,c): sys.stdout.write("\a") time.sleep(3) by calling "RunScript(special://userdata/scripts/shell.py,./test.py,6)" -> it works, I can hear the sound 6 times in total Any idea? RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2018-12-13 Enable the texturecache logfile - that would at least confirm if texturecache.py is running, and if it is it may give a clue why it is not working. However my expectation is that the texturecache.py script is not being run correctly, which may be due to Windows and/or RunScript. RE: [RELEASE] Texture Cache Maintenance utility - Mr.Floppy - 2018-12-13 I enabled logging in the texturecache.cfg, but it doesn't even start logging when using the "RunScript" method! (Running it from the windows 7 command line, however, does create a logfile.) But maybe I now have got a hint what is going wrong: I put the code from my "test.py" into your "texturecache.py" just to find out why it isn't executed when using the "RunScript" method. #!/usr/bin/env python # -*- encoding: utf-8 -*- import os, sys, platform, re, datetime, time import socket, base64, hashlib import threading, random import errno, codecs import subprocess import tempfile for z in range(0,3): sys.stdout.write("\a") time.sleep(3) Result: no execution but when "socket" is removed, it looks like this #!/usr/bin/env python # -*- encoding: utf-8 -*- import os, sys, platform, re, datetime, time import base64, hashlib import threading, random import errno, codecs import subprocess import tempfile for z in range(0,3): sys.stdout.write("\a") time.sleep(3) Result: it does work!!!!!!! So I think the issue is related to the use of "import socket" under "KODI 18 for Windows", thus "texturecache.py" needs some modification to work again with the "RunScript" method. Could you please have a look at it? Thank you in advance! RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2018-12-14 (2018-12-13, 20:17)Mr.Floppy Wrote: So I think the issue is related to the use of "import socket" under "KODI 18 for Windows", thus "texturecache.py" needs some modification to work again with the "RunScript" method. No sorry, pretty sure this is not a texturecache.py issue as the script is working fine from the command line - if anything it's a Kodi on Windows issue, in which case you should open an issue on the Kodi github posting your sample test script with/without import socket. Unfortunately the socket module is pretty crucial to the functionality of texturecache.py and removing it will not be possible. RE: [RELEASE] Texture Cache Maintenance utility - Mr.Floppy - 2018-12-21 I'm very sorry, it was all my fault... Obviously, I had installed "Python 2.x" in its 32bit version, and because there is only a 32bit version of KODI v17.6, no problems occured. Then KODI 18 came out, and I chose the first download link (=64bit version), but did forget to remove the 32bit version of "Python 2.x" and replace it with its 64bit version... After doing so, all is working fine now! RE: [RELEASE] Texture Cache Maintenance utility - mrpg - 2019-01-05 I am using kodi 18 nightly, and i ran texturecache.py C recently. After this, i am missing most of the artwork for my movies, for example posters for 80% of my movies, just have a blank thumbnail. I tried deleting the Textures13.db file, but its still the same issue. Can anyone give me some other suggestions on how i can fix this? Mant thanks for any help! Br Patric RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2019-01-05 (2019-01-05, 19:31)mrpg Wrote: I am using kodi 18 nightly,Check your Kodi log for errors. If your artwork is remote, check it is still accessible. If artwork has been cached, look in the Thumbnails folder and view some of the cached jpgs outside of Kodi (ie. in a browser, photo/image viewing tool) to make sure they're not corrupt. RE: [RELEASE] Texture Cache Maintenance utility - mrpg - 2019-01-06 Thanks for the reply, ok, i see something i do not understand in the logs, as far as i know, i have never asked kodi to save images for anything on my nas. But its looking for movie posters on an nfs mounted disk (i.e my nas) 13:05:31.901 T:140613692253952 DEBUG: GetImageHash - unable to stat url /data/nas2/Various/Patric/xbmc_videodb_2017-01-27/movies/Austin_Powers:_The_Spy_Who_Shagged_Me_1970-poster.jpg The xbmc_videodb... folder does not exists in that path , and i would really not want them cached there, prefer they were local on the kodi pc How can i correct this? Br PG RE: [RELEASE] Texture Cache Maintenance utility - mrpg - 2019-01-06 Worked around it by changing source to "none" and back to "movies" and refreshed the source. RE: [RELEASE] Texture Cache Maintenance utility - xodi - 2019-01-12 For version 2.4.8, I used the "c" option to cache all textures, from the output of the command, I saw a lot of images cached and there is no problem reported at the end, but I found the discart and actor image are still being loaded from online by Kodi (it took some time before these image showing). Is this expected? DEBUG: Caching image 'https://assets.fanart.tv/fanart/movies/269149/moviedisc/zootopia-56bfc33e7cd6f.png' to '6/6e7066a1.png': DEBUG: cached image 'special://masterprofile/Thumbnails/6/6e7066a1.png' size 720x720 DEBUG: Caching image 'http://image.tmdb.org/t/p/original/mEArEtz9hiSptnllYJvhh0mbp35.jpg' to 'd/de43a668.jpg': DEBUG: cached image 'special://masterprofile/Thumbnails/d/de43a668.jpg' size 300x450 I run the "P" command to clear the texture and run "c" command again to cache and then run the "p" to see what's non-referenced image in texture cache, just found a lot of discart and actor images in the list, for example: 031496|b/b2ad02e2.png|0720|0720|0001|| |https://assets.fanart.tv/fanart/movies/315635/moviedisc/spider-man-homecoming-590086b14964f.png Seems the texturecache tool cached these images successfully, but failed to set them in database, so Kodi has no knowledge about them and download it again from online when they are used. |