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 - Tolriq - 2012-08-20 (2012-08-20, 21:09)Montellese Wrote:(2012-08-20, 20:51)Tolriq Wrote: Is there a way to get .strm files in Files.GetDirectory with media set to video ?.strm is in the list of video extensions so they should be listed by Files.GetDirectory when "media" is set to "video". After some tests this seems to works sorry for asking seems I always need to triple check users comments before asking :p RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mkleynhans - 2012-08-22 Hi Guys, I am trying to re-write a very basic AMX control system that was controlling a Dharma based system using HTTP API sendkey commands. eg. 'GET /xbmcCmds/xbmcHttp?command=sendkey(61478) HTTP/1.1' for Up. I am now trying to get this to work on Dharma and it seems some commands dont work anymore so I am going to have to change to the JSON method. I have worked out basic controls. eg. '{"jsonrpc": "2.0", "method": "Input.Up", "params": {}, "id": "10"}' for Up but cannot find ways of controlling things like Page Up, Page Down, Update Movies, Update Videos, Jump to Movies Folder, Jump to TV Shows, Context Menu, Info etc. etc. Is there a need to have a mixture of sendkeys and JSON or is there a practical way of getting all one way commands working under JSON? Sorry if this has been answered, I have tried to read through as many pages as I can and have searched for obvious stuff but have only found some references to Input.ExecuteAction but think that this is for a newer version of XBMC. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-22 Sendkeys via http won't work at all when Frodo is released. For all Json commands you can check the Wiki or use the JSon.Introspect command or directly : https://github.com/xbmc/xbmc/blob/master/xbmc/interfaces/json-rpc/methods.json Some of the commands you needs may never see light in Json you must use EventServer / Client for that , check Wiki. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - grywnn - 2012-08-23 i'm currently playing around with the new setFooDetails methods, and noticed the following when trying to update episode playcounts: Code: 17:19:11 T:4664594432 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.SetEpisodeDetails", "params": {"episodeid": 222, "playcount": 1 }, "id": 1} Am i doing anything wrong or did i stumble upon a bug? argh forgot to mention: XBMC 12.0-alpha5 git:20120823-bc0813f running on OS X RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-24 (2012-08-23, 17:25)grywnn Wrote: i'm currently playing around with the new setFooDetails methods, and noticed the following when trying to update episode playcounts:With "does not work for episodes" you mean you checked that the playcount didn't change after you ran that request? Because that "Type mismatch in type 1" debug message is not really an error. I just tested it on a few of my episodes and changing the playcount works fine. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Bram77 - 2012-08-24 Is the JSON-rpc service using open sockets and if not...are you planning to implement this? edit: I'm aiming at the http service RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-24 What do you mean with "open sockets"? There are currently three ways to use the JSON-RPC API from a remote client: 1. Using HTTP POST requests on the port of the webserver and with the following URL: http://<ip>:<port>/jsonrpc 2. Using WebSockets on the port of the TCP server (9090 by default) and with the following URL: ws://<ip>:<port>/jsonrpc 3. Using a raw TCP socket on the port of the TCP server (9090 by default) HTTP POST does not support server-side notifications but it has image download capabilities (which the other two don't). RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Bram77 - 2012-08-24 Thanks for explaining, but that I already knew . With Python and Node.js (probably others too) it's possible to create an open http server connection. It's the same as any other http connection except the connection never closes like a traditional http connection does. This means there is no more three way handshake at every request which is WAY faster and results in a smaller memory footprint. Open sockets are also referred to as 'streaming sockets' if I'm not mistaking. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - grywnn - 2012-08-24 Concerning the watched status of episodes: Never mind. Looks like the playcount is updated correctly. It's my XBMC that doesn't update the checkmarks if the episode was on screen in a list before. Don't know wether its a skin issue (using confluence) or XBMC related: When i have a season list on screen in XBMC, update the playcount of one of its episodes via JSON, the checkmark isn't updated even if i leave an re-enter the episode list. Checkmarks apear correctly if a change the status of an episode that hasn't been on screen before. My guess would be a caching issue. Edit: Any episode i update looses it's sd/hd badge when i change the playcount. Strange. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-24 (2012-08-24, 11:31)grywnn Wrote: Concerning the watched status of episodes: See http://trac.xbmc.org/ticket/13173 XBMC cashes GUI listings and if it's not told to re-fetch the list it will just get whatever it displayed before so that's why you don't see the update. I didn't have time to look into a proper fix yet. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-24 (2012-08-24, 11:30)Bram77 Wrote: Thanks for explaining, but that I already knew . The only http mechanism I'm aware that may act like this is Keep-Alive of HTTP 1.1. And while I'm not sure Xbmc webserver do handle 1.1 this would lead to lot's of problems due to the limits at 4 threads in current implementation So having a long timeout would pause lot's of problem and having a small timeout would not have a lot of interest RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Bram77 - 2012-08-24 It's fast enough now . Thanks for explaining. Another question... Is it in anyway possible to recursively add directory content to a playlist, without requiring multiple requests or a chained request? I can only find this parameter for Player.Open in the Pictures context. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-25 No this is currently not possible but I think there's already a feature request for it somewhere on Trac. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-08-25 Somewhat confused, more than likely me not understand but why does: Code: {"jsonrpc": "2.0", "method": "videoLibrary.Gettvshows", "params": { "filter": { "or": [ {"field": "title", "operator": "startswith", "value": "v"},{"field": "genre", "operator": "is", "value": "comedy"} ] } }, "id": 1} RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-25 Hm you should be able to use "or" and "and" the same way. Do you get an error response or is it just a debug output in the XBMC log? If it's the latter I really need to remove that output as it seems to confuse a lot of people. |