[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-25 (2013-11-25, 00:05)redglory Wrote: Tried to run your script like this: As you're on Windows, your prefix should be E:\Movies not E:/Movies. Remember to add --readonly unless you want the script to write new artwork into your E:\Movies folders! Also, as you're using single movies per folder, the script may create (or look) for artwork files using movie name as a prefix... ie. for E:\Movies\Zombieland.(2009)\Zombieland.2009.BR-Disk.xvid.avi it will look for a poster called "E:\Movies\Zombieland.(2009)\Zombieland.2009.BR-Disk.xvid-poster.jpg". If you would rather it did not use the movie name prefix, let me know and I'll see about making a change to support that - it may be possible to automatically detect this situation if the folder starts with the same name as the media file, or I'll just add a switch --singlefolders or something like that. RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2013-11-25 Yup, just noticed the --readonly flag before you posted. I've edit my post with a log as I've tried with: Code: ./texturecache.py jd movies | tools/mklocal.py --readonly --local E:\Movies --prefix E:\Movies --artwork fanart poster clearlogo clearart --output fixup.dat same error displaying prefixes not match... And i think your suggestion would be great as an command option. thanks a lot for your quick answers RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-25 I've added the switch --singlefolders to mklocal.py which you'll need to use when you have movies in individual folders, and I've also tweaked the mapping functionality to make it a bit more Windows friendly (the regex subsitutions were objecting to the backward slashes). Please re-download the latest mklocal.py - you'll need to pull the file from github again as there's no update functionality built into mklocal.py (it shouldn't change that often - famous last words!) Also, update your texturecache.py to v1.1.6 as I've stopped it complaining when output fails due to a broken pipe, which happens when mklocal.py exits abruptly. (2013-11-25, 00:31)redglory Wrote: Yup, just noticed the --readonly flag before you posted. I'm just a bit confused, are you running this on Windows or Linux? It's just that you're using a mixture of Linux and Windows notation, and of course you'll need to be on Windows to access your E:\ drive. Assuming you are on Windows, try the following and paste the output: Code: texturecache.py jd movies zombieland | tools\mklocal.py --readonly --singlefolders --local E:\Movies --prefix E:\Movies --artwork fanart poster clearlogo clearart --output fixup.dat --verbose If that doesn't work, please also paste the output from the following: Code: texturecache.py jd movies zombieland Cheers. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-25 Hold on, minor patch coming up... RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2013-11-25 Was using it on a Git Bash terminal window, but directory mappings are a bit confusing...and must be the problem. Windows path "E:\Movies" is referenced by /e/movies Ran this code on CMD: Code: python texturecache.py jd movies zombieland | tools\mklocal.py --readonly --singlefolders --local E:\Movies --prefix E:\Movies --artwork fanart poster clearlogo clearart --output fixup.dat --verbose Output Seems alright! Just gonna wait for your update to run complete movie library. Thanks alot! RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-25 OK download tools/mklocal.py again - should be working now on both Windows and Linux, --singlefolders or not... If it's not working, can you paste the output as requested in post #528. Thanks. (2013-11-25, 02:15)redglory Wrote: Was using it on a Git Bash terminal window, but directory mappings are a bit confusing...and must be the problem. You link is the output from texturecache.py, but what about the console output from mklocal.py? I also note that your current fanart and poster artwork uses movie name prefixes, but your clearart and clearlogo do not use the movie name prefix. Hmmm. That's a pain... RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2013-11-25 (2013-11-25, 02:17)MilhouseVH Wrote: OK download tools/mklocal.py again - should be working now on both Windows and Linux, --singlefolders or not... If it's not working, can you paste the output as requested in post #528. Thanks. Just ran above command again and this is the output: log I suppose I'll run this for my movie entire collection RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-25 (2013-11-25, 02:26)redglory Wrote: Just ran above command again and this is the output: log That's still the log from texturecache.py, not the output from mklocal.py - what are you seeing on the console? Don't hold me accountable if this goes horribly wrong... I'm also considering a fix for your mixture of artwork with and without movie names, but if you want to proceed let me know how it goes! RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2013-11-25 I suppose stack files are not supported? I keep getting this: Code: ##DEBUG## mediatype [movie]; mediatitle [Zero Dark Thirty] Here it is my fixup.dat RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-25 (2013-11-25, 02:37)redglory Wrote: I suppose stack files are not supported? Not at the moment, no... but give me a few minutes! RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2013-11-25 (2013-11-25, 02:44)MilhouseVH Wrote:(2013-11-25, 02:37)redglory Wrote: I suppose stack files are not supported? Man, you a freaky coder Just edited my previous post with fixup.dat log. RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-25 (2013-11-25, 02:47)redglory Wrote: Just edited my previous post with fixup.dat log. Blimey, it's working...kinda! Just looking at Zombieland, and I notice your current clearart and logo urls in the media library are nicely "mangled", ie. you currently have: Code: "clearart":"image://E:\Movies\Zombieland.(2009)/clearart.png/" This script has automatically fixed that (pure fluke), and consequently it now recognises these urls as having changed, so it wants to update this movie. It's correct to do so, but that's why they're there in the output. Moving on to fanart and poster, I'm not entirely sure why the poster and fanart weren't listed as changed items for Zombieland - could you run the following and paste just the console output, thanks: Code: python texturecache.py jd movies zombieland | tools\mklocal.py --readonly --singlefolders --local E:\Movies --prefix E:\Movies --artwork fanart poster clearlogo clearart --output --verbose I'll have a version that works with mixed movie-name prefixes (this will still require the --singlefolders switch and is only useful in a situation like yours where the artwork already exists using a mixture of names - this may also explain the lack of posters and fanart in your current output), and also stacked files in a jiffy... (2013-11-25, 02:47)redglory Wrote: Man, you a freaky coder Oh and Python is fun. Question on stacking - how do you name your artwork for a stacked movie, eg. Zero Dark Thirty? RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-25 Pushed another update to mklocal.py, this time with support for mixed movie-name prefix usage when reading existing local files (must specify --singlefolders to activate this) and also with initial unstacking support, though not entirely sure how you name your artwork here so may require an additional fix... for now it just uses the first media filename which will most likely be *.cd1. RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2013-11-25 Hey, I'm not at home right now and when possible I'll test it again. My stacked movie fanart are defined as: Movie.dvdrip.cd1.avi | Movie.dvdrip.cd2.avi is set as Movie.dvdrip-fanart.jpg (it removes part numbering) It's an option inside EmberMM. My goal after having this working as expected is to integrate a button inside EmberMM so that I can refresh art caching inside XBMC when I eventually change Movie fanart. I have an SANnzbd script which follows this sequence: 1. SABnzbd finishes 2. CPS renames movie accordingly 3. EmberMM scrapes movie 4. XBMC library gets updated Sometimes I don't like specific fanart and choose to modify it. That's when your script will get extremelly helpful! Let's complete sequence with 5. Re-cache movie fanart Will report back RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2013-11-25 (2013-11-25, 13:01)redglory Wrote: My stacked movie fanart are defined as: Movie.dvdrip.cd1.avi | Movie.dvdrip.cd2.avi is set as Movie.dvdrip-fanart.jpg (it removes part numbering) OK there's a new version of mklocal.py up on github that should support this, it will strip out the cd/disc/part/whatever so in the above case it should find artwork named as "Movie.dvdrip-fanart.jpg" (fingers crossed). |