[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 - 2017-02-20 Hi @marcelveldt - I don't think so, as that's another dependency I'd rather not have, to be honest (plus your add-on would need to provide some sort of JSON interface - the texturecache.py script is not an add-on). The current omdbapi implementation is working fine (so long as OMDB is available) and with it I can probably access the omdb data much faster (using multiple threads, up to 20 is allowed/supported by omdbapi.com) than I could via Kodi which is running another script (and may be running on a low-end device, so much more work for the same end result). Caching is a valid concern, and I hope people don't hammer omdbapi.com by using the imdb option on a too regular basis - I think running the imdb option once a week should be enough. I myself have it scheduled to run imdb on a Sunday, once for movies and then again for tvshows. RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2017-02-22 Hi @Milhouse, I'm going to schedule weekly imdb fields update (votes, rating and top250) for movies and tvshows. Can I use it like this: Code: pythonw texturecache.py imdb movies | python texturecache.py set Code: pythonw texturecache.py imdb tvshows | python texturecache.py set As the output is piped to texturecache.py set I suppose i won't have problem with stout or sterr right? Thanks RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2017-02-22 @redglory should work yes. RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2017-02-23 (2017-02-22, 02:50)Milhouse Wrote: @redglory should work yes. Milhouse, do you use Task Scheduler? Can you share your command line parameters? I don't think texturecache.py set is working correctly. I'm using: Code: cmd /C C:\Python27\python.exe texturecache.py imdb tvshows @logfile=logs/imdb_tvshows.log | c:\Python27\python.exe texturecache.py set @logfile=logs/imdb_tvshows_set.log But the pipe ("|") isn't capturing anything from stdin (which supposely would be stout output from first command) Thanks EDIT: running the first command isn't returning anything? Maybe I got blocked from omdb.com? too much requests? RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2017-02-23 No I use cron (I run texturecache.py on a Raspbian based Raspberry Pi). Your command would work on Linux for sure, and I'd expect it to work on Windows too though I'm not sure about the various cmd switches - I'd probably put the commands into an imdb.cmd file and then schedule imdb.cmd. Your log file should tell you what is happening, and if omdbapi.com is responding or not. I just ran "texturecache.py imdb tvshows" here (UK) and it's currently working although I did see a number of "timeout" failures in the log which suggests the omdbapi.com service may not be back to normal just yet (perhaps the new server can't cope with the load). RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2017-02-24 I'm executing this on cmd: Code: python texturecache.py imdb tvshows and always outputs [] RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2017-02-24 (2017-02-24, 00:42)redglory Wrote: I'm executing this on cmd: That means one of 3 things: 1) you have no TV shows, 2) all your tv show/episodes are failing when querying omdbapi.com or 3) you have no episodes that need updating You should see in the logfile when omdbapi.com queries fail to obtain a result. Assuming some omdbapi.com queries are succeeding (sorry, this isn't shown clearly in the log - you can only tell by the absence of a failure message) and you're not getting any "changes" (ie. "[]" is being output) then this would confirm that your current media library matches perfectly with omdbapi.com and nothing needs to be updated. I'm not sure how often omdbapi.com will update it's own database, it might only be once a day so running this script repeatedly is unlikely to be beneficial. If you just want to test your code, you can manually change the votes for an episode so that re-runnig "imdb tvshows" should correct the change (assuming the episode is being found on omdbapi.com, of course): Here's an example, using the show "Lucifer": Code: texturecache.py/texturecache.py imdb tvshows lucifer So no errors/failures - all episodes are being found on omdbapi.com - and nothing that needs updating. View the votes for the tvshow: Code: texturecache.py Jd tvshows lucifer @extrajson.tvshows.episode=votes This is my result: http://sprunge.us/UbhJ Now pick an episode and make a note of the episodeid - in my case, the latest episode 2x13 has episodeid 20387 (with votes 412) Change the number of votes to something other than its current value, for example 1: Code: texturecache.py set episode 20387 votes 1 And now re-run the imdb update: Code: texturecache.py/texturecache.py imdb tvshows lucifer You can do this repeatedly until you are happy with your code. If you still get no changes after changing the votes then please upload your logfile somewhere when running "imdb tvshows <tvshowname>" RE: [RELEASE] Texture Cache Maintenance utility - User 224999 - 2017-02-24 (2017-02-20, 21:20)Milhouse Wrote: Hi @marcelveldt - I don't think so, as that's another dependency I'd rather not have, to be honest (plus your add-on would need to provide some sort of JSON interface - the texturecache.py script is not an add-on). The current omdbapi implementation is working fine (so long as OMDB is available) and with it I can probably access the omdb data much faster (using multiple threads, up to 20 is allowed/supported by omdbapi.com) than I could via Kodi which is running another script (and may be running on a low-end device, so much more work for the same end result). Ah, I see. Makes sense. I can provide you that json interface but like you said, a python service within Kodi will probably be much too slow for the purpose. Maybe indeed just inform users to not abuse the service for the sake of server capacity. OMDB info is refreshed no more than 14 days anyways. RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2017-02-24 @Milhouse, I'll try with a single show/episode and report back Thanks EDIT: Tested with Avatar and my Kodi library's votes are equal to OMDB but not the same as IMDB ?! It seems OMDB isn't synced with IMDB. RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2017-02-25 I'm having a weird problem. I first tried to pipe imdb json results to texturecache.py set and I get: Code: λ python texturecache.py imdb movies | python texturecache.py set But then tried to write to file and then read from it: Code: λ python texturecache.py imdb movies > imdb.dat Code: λ type imdb.dat | python texturecache.py set And set worked as expected. Something wrong with pipe | ?! RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2017-02-25 The error/failure is in the first call to "texturecache.py imdb movies". In order to identify top 250 movies it retrieves top 250 results from http://top250.info/charts which redirects to https://top250.info/charts - not sure if it's always performed this http-to-https redirect, but it's doing now. Which isn't really a problem, except when the host fails to verify the certificate as happened in your case. Seems like it might be an intermittent problem (no issues for me), possibly resulting from some sort of load balancing where one server could be misconfigured. Keep trying and if it continues to be a problem we may need to disable certificate verification. RE: [RELEASE] Texture Cache Maintenance utility - redglory - 2017-02-27 My script ran on sunday without any issue. Maybe it was a temporary problem RE: [RELEASE] Texture Cache Maintenance utility - bigjess007 - 2017-03-04 I'm trying to run texturecache remotely from ubuntu to an android tv box and can not get it to connect. And for the life of me, I can't figure out what I am doing wrong. I've installed texturecache per the instructions. I've set the config file to the IP address of the box I have (and removed the # at the front of the line). Here is the output when I run it: Code: FATAL: The task you wish to perform requires read/write file I turned on the log file too, and here is the output from it: Code: 2017-03-04 14:15:25.251679:MainThread: Command line args: ['./texturecache.py', 'x'] It's like texturecache isn't recognizing I told it to connect to a remote IP. But the cfg file is definitely set. I started thinking maybe there is a communication error between this ubuntu box and the android box. So via a webbrowser, I tested via a simple json web address message test: Code: http://ipofandroidtvbox:8080/jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"ATTENTION","message":"MESSAGEHERE"},"id":1} And ofcourse I get the message on tv. So I know communication is working. I'm guessing this is something obvious I've done wrong, but I sure can't find it. Can someone point me in the right direction? Thanks! RE: [RELEASE] Texture Cache Maintenance utility - Milhouse - 2017-03-05 Unfortunately you cut off your log just before it got interesting, when it would have shown the version of JSON API installed in your Android Kodi client - presumably it's not recent as it doesn't support the JSON TexturesDB API introduced with JSON 6.9.0 (added in Kodi 13 on 26 Oct 2013). Without TexturesDB API support the script has to access your SQLite database directly, and in order to do that it needs access to the filesystem ether via a mount point, or running the script locally on the client (both of which will likely be problematic for Android, in which case upgrading the version of Kodi would be best). RE: [RELEASE] Texture Cache Maintenance utility - bigjess007 - 2017-03-05 That was all the log file had. I'm also running Kodi 16.1 Does this clarify? |