JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174) +---- Thread: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC (/showthread.php?tid=68263) 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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-05-06 I've figured out where I went wrong. When turning on the remote control option you have to exit XBMC and restart for it to take effect. Switching off works without a restart. This is for "other systems", I don't know about local. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-05-06 To confirm all Player.OnPlay give the error: Code: Received unexpected continuation frame. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-05-06 Question Sunday: Is there a reason why I can't request the "file" property for albums? I do it with TV Shows to get the logo's and I'm thinking of seeing what I can do with the cdart files in case you want to know why. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-05-06 I'll have to look into both the "Received unexpected continuation frame" and the "other systems" setting not being available immediately after changing it. Could you please create bug tickets for these and CC me so I don't forget. Thanks. IIRC the initial reasoning behind "file" not being available for albums (and artists) is because an album may be scattered over multiple directories so there's no "unique" path to the album. But the same reasoning could apply to tvshows. I guess a feature request can't hurt RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - jmarshall - 2012-05-06 @Montellese: The same argument does apply to tvshows (which the db handles really badly - multiple ids for a show rather than multiple paths and a single id). @Mizaki: I think the main problem here is you shouldn't need to assume anything about where images may or may not lie, and furthermore you shouldn't assume you have access to said potential images on the filesystem. You may, however, assume that filesystem access can and will be shutdown come Frodo. Hopefully by then you won't need it for what you're doing Cheers, Jonathan RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-05-06 Done. Artists isn't so much of a problem as I do the same the skins and require people to enter the path. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - N3MIS15 - 2012-05-07 (2012-05-06, 13:28)Mizaki Wrote: To confirm all Player.OnPlay give the error:Same here. Using python websocket client lib i get Code: string index out of range RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - sjroesink - 2012-05-07 (2012-05-07, 08:16)N3MIS15 Wrote:(2012-05-06, 13:28)Mizaki Wrote: To confirm all Player.OnPlay give the error:Same here. Yeah, this is very annoying. @Montellese: this error seems to occur when the message contains 0x00 (new line perhaps?) For those interested: websockets can be debugged using fiddler (see the Log tab). The only problem is that fiddler throws an exception when the error "Received unexpected continuation frame" occurs: Quote:13:35:29:0439 [WebSocket #222] Server->Client (150 bytes) RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-05-11 Hello, 2 little questions Why is VideoLibrary.GetSeasons parameter tvshowid mandatory when it's not the case for GetEpisodes for examples. Getting all seasons for all shows makes a lot's of requests when it's not needed for episodes (and it's good :p) And other one about performances, it seems on some low end Xbmc machine a query that will return more than 1000 results will be really really really really .... slow, is it due to slow database or too much data to encode to Json ? (Well the final question is : Does putting limits to query to get bunch of say 500 items will be quicker or slower). RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-05-11 (2012-05-11, 21:04)Tolriq Wrote: Why is VideoLibrary.GetSeasons parameter tvshowid mandatory when it's not the case for GetEpisodes for examples. Getting all seasons for all shows makes a lot's of requests when it's not needed for episodes (and it's good :p)Because up until a few days ago XBMC didn't really store seasons. It just stored tvshows and episodes and then season were deduced from the episodes. That's also why there is no "seasonid" (compared to "tvshowid" and "episodeid") so XBMC doesn't offer a method to retrieve all seasons (and IMO it doesn't really make any sense either). (2012-05-11, 21:04)Tolriq Wrote: And other one about performances, it seems on some low end Xbmc machine a query that will return more than 1000 results will be really really really really .... slow, is it due to slow database or too much data to encode to Json ?It's because of the database queries. Especially if you retrieve properties like "cast" or "resume" or "set" it will get really slow because it has to do an extra query for every retrieved item. Currently it also won't be faster if you put a limit on the item retrieval but I have some unfinished work which will improve that. So the best you can do is not to retrieve those properties I mentioned (they are also mentioned in introspect so you might wanna check there because I might have forgotten one or two) when using FooLibrary.GetFoo and only retrieve those properties with FooLibrary.GetFooDetails. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-05-11 Well yes getting all seasons does not makes sense but Xbmc is really stupid on season thumbs Since the thumb can't be calculated because of language translations (ie the thumb value change if you change xbmc language ....) it's very hard to get them, so the GetSeasons is great for that and creating seasons from episodes does not work For full datasync for off-line browsing getting allseasons of all show in one query is interesting for remote writers. About performances for example for audio songs I only get : DetailsSong.ALBUM, DetailsSong.TRACK, DetailsSong.ALBUMID, DetailsSong.ARTISTID, DetailsSong.ALBUMARTIST, DetailsSong.DURATION, DetailsSong.THUMBNAIL, DetailsSong.GENRE, DetailsSong.TITLE, DetailsSong.ARTIST, DetailsSong.YEAR those should not slow the query. But on some Xbmc it can takes more than 30sec to get the result for 20k songs. (And I really mean 30 secs to get the first { not to download the data). RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - jmarshall - 2012-05-12 Tolriq: Also merged in the May window was moving video thumbs to the texture cache. No more silly storage techniques for them now. ATM they're not retrievable over the webserver - Montellese and I are deciding the best way to get them there (backward compatibility concerns + how to best move away from using the VFS for it) at the moment, so I expect that it will be ironed out in the next week or so. Cheers, Jonathan RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-05-12 (2012-05-11, 21:33)Tolriq Wrote: About performances for example for audio songs I only get : DetailsSong.ALBUM, DetailsSong.TRACK, DetailsSong.ALBUMID, DetailsSong.ARTISTID, DetailsSong.ALBUMARTIST, DetailsSong.DURATION, DetailsSong.THUMBNAIL, DetailsSong.GENRE, DetailsSong.TITLE, DetailsSong.ARTIST, DetailsSong.YEAR those should not slow the query. Well 20k songs is a lot of data to retrieve from the database and to write into JSON and will result in a huge JSON-RPC response. If the machine is an ATV or something like that it will take a while. The best solution to get around this would be to only retrieve e.g. 200 songs with one request so you can already display those but that approach currently doesn't make it faster, but like I said I'm working on that. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-05-12 Good news for the texture cache This will also allow easy cleanup. I hope the new out of VFS way will still allow to get multiple thumb at once. About songs or other big data, the final goal is not to just display but but make full database sync, for off-line remote browsing for example. This will be less a problem in Frodo due to dateAdded and such new fields but not an easy task in Eden. Is there a timeout in Xbmc Web Server part that would make such very long request to fail ? Like 60s or something ? I think I'll stick to get a full data request since you said it would be slower to get multiple request and I can play with read uncommitted on my client side. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-05-12 (2012-05-12, 11:34)Tolriq Wrote: Good news for the texture cache This will also allow easy cleanup.What do you mean by "get multiple thumbs at once"? Multiple HTTP requests in parallel? That will not change. (2012-05-12, 11:34)Tolriq Wrote: Is there a timeout in Xbmc Web Server part that would make such very long request to fail ? Like 60s or something ?XBMC's webserver has a timeout of 24 hours but your browser or your HTTP implementation may have it's own timeout. |