[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 - rbusenet - 2014-04-25 Cool. I got it working mostly! This should help tremendously! I think I'm on the same page with your method now. I've ran through the scripts and have mostly got what I was expecting to get which is awesome (Ie movies are now synced up using mysql data base and all movies are correctly cached). However I used basically the same approach and can't get my tvshows to respond the same way. 1: Update / Scrape TVshows folder to mysql 2: Scraping xbmc loads all images fine 3: run: python texturecache.py c tvshows This is what I get: http://pastebin.com/SgLmbsxe I'm fine with the two SNL jpgs not downloading. But I'm not sure what all the duplicates are all about and none of the images are showing up for the tv shows on the non-scraped xbmc? Thoughts? This is really slick. Not too sure why this isn't implemented directly into xbmc core! RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-04-25 (2014-04-25, 15:11)rbusenet Wrote: I'm fine with the two SNL jpgs not downloading. Yes, unfortunately they're no longer available - you'll need to find alternatives for those two. This is biggest problem when using remote content. (2014-04-25, 15:11)rbusenet Wrote: But I'm not sure what all the duplicates are all about The different conditions are described here - have a read and hopefully it should become clear, if not ask away... (2014-04-25, 15:11)rbusenet Wrote: and none of the images are showing up for the tv shows on the non-scraped xbmc? Thoughts?That's unusual, is there anything in xbmc.log on the client that has this problem (you might need to enable debug)? If the artwork has been cached successfully then it should be visible in the GUI, unless it's a skin problem - test with stock Confluence - or you're using some sort of path substitution which is preventing XBMC from accessing/reading the cached artwork correctly. RE: [RELEASE] Texture Cache Maintenance utility - rbusenet - 2014-04-26 I deleted the texture.db and tv32.db and now it works. I noticed that all of the most recent tv scrapes/additions worked fine so it was just old files that were not playing nice. I could have C'ed it I guess but either way it was a quick check to the theory and so far it is all looking good. I think I'm all squared away - Great product man! RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-04-26 My guess is that the database (Textures13.db) had rows claiming the artwork was present in the cache, but the files didn't actually exist in the Thumbnails folder, so XBMC had nothing to display as it wouldn't have found any of the cached files. XBMC should have complained about this in the log, though as you have worked out, deleting Textures13.db or running C fixes the problem and gets your XBMC back in sync. A more optimal solution is to use the "X"/"Xd" options: "X" will list any rows from Textures13.db that reference non-existent Thumbnails files, while "Xd" will delete these rows. RE: [RELEASE] Texture Cache Maintenance utility - RockDawg - 2014-04-27 I'm having a problem with mklocal.py. One of my sources in XBMC is smb:\\WOPR\HD Rips\ I think mklocal.py is choking on the space in the path name because it returns: Code: mklocal.py: error: unrecognized arguments: Rips How can I work around this? RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-04-27 (2014-04-27, 01:56)RockDawg Wrote: I'm having a problem with mklocal.py. One of my sources in XBMC is smb:\\WOPR\HD Rips\ I think mklocal.py is choking on the space in the path name because it returns: If you're passing "smb:\\WOPR\HD Rips" as the --prefix make sure it's quoted, or escape the space ie. smb:\\WOPR\HD\ Rips - could be the argument parsing that is (quite rightly) choking on the space, interpreting Rips as an argument. Failing that, can you PM me the input you are feeding to mklocal.py (or post it here, just one movie or tvshow with the path should be sufficient), and also tell me the exact command line you are using to run mklocal.py. RE: [RELEASE] Texture Cache Maintenance utility - RockDawg - 2014-04-27 (2014-04-27, 01:58)MilhouseVH Wrote:(2014-04-27, 01:56)RockDawg Wrote: I'm having a problem with mklocal.py. One of my sources in XBMC is smb:\\WOPR\HD Rips\ I think mklocal.py is choking on the space in the path name because it returns: Escaping the space didn't work, but the quotes did. Thanks a lot!! RE: [RELEASE] Texture Cache Maintenance utility - rbusenet - 2014-04-27 (2014-04-26, 04:09)MilhouseVH Wrote: My guess is that the database (Textures13.db) had rows claiming the artwork was present in the cache, but the files didn't actually exist in the Thumbnails folder, so XBMC had nothing to display as it wouldn't have found any of the cached files. Yeah I'm sure that's exactly what happened. I'm still trying to figure out all of the commands but I'll give he Xd a go. Thanks! RE: [RELEASE] Texture Cache Maintenance utility - postdeath - 2014-04-29 Thanks for this, Milhouse - it's incredibly useful and time-saving! RE: [RELEASE] Texture Cache Maintenance utility - rbusenet - 2014-04-29 Milhouse - I saw where you described how to attach this to a bash cron job. I got that working but was wondering how you have your's setup. I can see that a cron job isn't exactly the most efficient setup for this script. Ideally the scraper xbmc should trigger the client xbmc to start the script when something new has been scrapped. That, or have the NAS running the msql trigger it. Either way I'm not too sure how to trigger the script externally. I'd probably be ok with it running on boot. My client xbmc is off most of the time so I'd probably prefer it to just run on startup. What are your thoughts? RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-04-29 (2014-04-29, 17:41)rbusenet Wrote: I got that working but was wondering how you have your's setup. I have a NAS (FreeNAS, exporting NFS, running MySQL), a headless Raspbian-based Raspberry Pi(*) on which I run Sickbeard/Transmission and other scheduled tasks including all the scripts to handle XBMC scraping, an XBMC "scraper" client (OpenELEC Raspberry Pi, this is the "scraper" as it's always "on") and an XBMC non-scraper client (OpenELEC x86). *This could have been the NAS instead of a Raspbian Raspberry Pi, but I prefer to keep the NAS "as a NAS" as much as possible and I'd have put MySQL on the Pi too if it had the grunt! This is pretty much my approach: TV Shows: These all come via Sickbeard running on a Raspbian Raspberry Pi. I have a Sickbeard post-processing script that is called by Sickbeard whenever it has copied a new episode to my NAS, and this post processing script is passed the file name of the new episode media file (mkv, avi etc.). The post-processing script uses mediainfo to add streamdetails to the corresponding NFO for the new media file, and then the following actions are performed:
Movies: These I rip myself, copy to the NAS along with artwork, then I create the NFO file using Ember. A daemon (started at boot, running on the Raspbian Pi, wakes at 5 minute intervals) uses "find" to locate any new movies, and only when all of the new movies have a matching NFO then the following actions are performed:
So my workflow for TV shows is... precisely nothing, everything works automatically - shows are loaded automatically as they become available, artwork is updated and backfilled, all caches are pre-loaded. For movies, I copy the new movie files(s) and associated fanart/poster artwork to my NAS after ripping, scrape each new movie into Ember which creates the NFO file (with streamdetails etc.) on the NAS, and once all the movies have their NFO files, within 5 minutes the scraping process will have started automatically on the "scraper" client. Once the database optimisations have landed I will consider adding a call to update imdb movie rating/vote information on a more regular basis - the current JSON/database update performance doesn't really make this feasible right now. (2014-04-29, 17:41)rbusenet Wrote: I can see that a cron job isn't exactly the most efficient setup for this script. Ideally the scraper xbmc should trigger the client xbmc to start the script when something new has been scrapped. There is an addon, I think - I can't recall the name[1][2] - that allows you to execute external shell scripts. One solution might be to call a shell script from within XBMC (you'll probably want to fork a new process within the shell script, as it can take a while to finish). The shell script can then perform all or some of the above steps - that is, the shell script initiates the library scan and performs all the other steps, not XBMC starting the scan and then somehow calling the script to complete the remaining steps. Maybe the following addons will be of use - not sure if they're Gotham compatible: 1: http://forum.xbmc.org/showthread.php?tid=85724 2: http://forum.xbmc.org/showthread.php?tid=151011 RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2014-04-30 Hey Millhouse i also use Ember to scrape movies automatically. I call it within my post processing script. Bur i don't rip my movies manually though! RE: [RELEASE] Texture Cache Maintenance utility - mcarni - 2014-05-01 @ Milhouse, i know it is off-topic, but I hope you could point me in the right direction. I see that you wake some of your xbmc non scraping clients, I assume you use some kind of Wake On Lan. I am not sure if all your non scraping clients are x86 machine, just in case one is a raspberry, since I tried waking over lan my raspberry through wol and etherwake but I couldn't do it, is there any recommendation you could give me? Thanks a lot M RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2014-05-01 (2014-05-01, 22:16)mcarni Wrote: I see that you wake some of your xbmc non scraping clients, I assume you use some kind of Wake On Lan. Yes, it's built-in to texturecache.py. Code: ./texturecache,py wake @network.mac=d0:27:88:0e:7a:42 or configure an appropriate "section" in your texturecache.cfg and specify the section name (@section=name) eg. Code: #globals Code: ./texturecache,py @section=lounge wake to wake the "lounge" PC, and Code: ./texturecache,py @section=lounge power suspend (2014-05-01, 22:16)mcarni Wrote: I am not sure if all your non scraping clients are x86 machine, just in case one is a raspberry, since I tried waking over lan my raspberry through wol and etherwake but I couldn't do it, is there any recommendation you could give me? The Pi doesn't support a suspend mode - once it's powered down (only red light visible) you need to power cycle it to restart and there is no WOL support (just leave it on 24x7). RE: [RELEASE] Texture Cache Maintenance utility - mcarni - 2014-05-01 @Milhouse, thanks a lot, as always very clear and helpful M |