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 - mikebzh44 - 2012-06-08 I would say : Code: curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Export", "param" : {"images": "true"}, "id": "mybash"}' -H 'content-type: application/json;' http://htpc:8080/jsonrpc RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-06-08 (2012-06-08, 04:04)rickles Wrote: Hi, I have spent way too much time trying to figure this out so I hope someone can help me. I am using curl to remotely export my video library from the terminal: Code: curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Export", "pararms": { "options": { "images": true } }, "id": "mybash"}' -H 'content-type: application/json;' http://htpc:8080/jsonrpc RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-06-09 I thought I'd test out the new filtering which looks like it's gone in now. Using VideoLibrary.GetMovies with any kind of sorting doesn't work. Everything is always in movieid order with or without using limits. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-06-09 Holy crap I actually didn't wanna push the JSON-RPC stuff yet because it's not done. That's what you get for trying to get something in during the current merge window. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-06-09 I did wonder why it was only on the video library. The speed looks good with limiting anyway RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-06-09 I reverted the json-rpc related commit for now and will add it properly ASAP. Sorry about that. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-06-09 I may be missing something blindingly obvious but are websockets not working with Firefox? I'm using 13 and the XBMC log says "WebSocket [RFC6455]: invalid "connection" received". The http://www.websocket.org/echo.html works though. Chrome is fine. Is anyone working with websockets and Firefox? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-06-09 Because Firefox seems to send "Connection: keep-alive, Upgrade" instead of the expected "Connection: Upgrade" in the websocket handshake. Will have to check with RFC6455 if that's "legal" or not. EDIT: OK RFC6455 states that the "Connection" header must CONTAIN "Upgrade" so I've fixed that. Now establishing a connection and sending JSON-RPC requests works but disconnecting throws an error. Once I've figured that out I'll push the fixes. Thanks for the report. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-06-09 OK I've pushed the fix for establishing a websocket connection with Firefox. But I couldn't really figure out why it fails on the disconnect. It seems like it doesn't expect a Close frame as a response to it's own Close frame but the RFC states Quote:If an endpoint receives a Close frame and did not previously send a Close frame, the endpoint MUST send a Close frame in response.so XBMC has to send that Close frame. If I don't send that Close frame and just close the TCP connection, the error disappears. While that also works fine in Chrome and also seems to be what the websocket server implementation of www.websocket.org does (looking at the sent packets in Wireshark there's no response from websocket.org after the Close frame) it is not what the RFC states. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-06-09 It does seem that Mozilla and Google are becoming "Old" Microsoft like as Microsoft become more compliant. Anyway, thanks for the quick fix. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-06-09 Internally generated thumbnails don't appear to be sent. To be clear: TheTVDB doesn't have an image for an episode so XBMC takes a random screen shot. The "thumbnail" property for that episode is empty. Bug ticket? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-06-09 Yes please and CC me and jmarshall. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-06-10 Is Firefox working with websockets for you now? I refresh and it worked once (didn't pay any attention as it was working). Since then I've not been able to get it to work again the log has: Code: 00:06:47 T:2796526448 DEBUG: JSONRPC Server: New connection detected RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-06-10 Works perfectly fine for me with Firefox 13 on win32. That part of the debug log states the same. What does not work after you connected? Is this with your own implementation or with the echo test from websocket.org? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-06-10 It's very weird. I fired up my old laptop to test and it works fine on there. My desktop just won't connect. It times out and FF says it can't connect. The echo test site works without a problem. I guess it's just limited to my desktop. |