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 - Montellese - 2013-01-05 (2013-01-05, 12:12)kevinkelm Wrote: That's great thanks. Would this work for toggling subtitles on and off? Currently for SetSubtitle only the values "previous", "next", "off" and "on" or a specific subtitle index (0 to x) are supported. Subtitles are more of a cycle and not a toggle thing. But I guess in the future it would make sense to either add a "cycle" value which goes from "off" to 0 to 1 to ... to "off" or add a "toggle" value which just toggles between "off" and "on". RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - wuench - 2013-01-05 (2013-01-05, 09:35)Montellese Wrote: What's the filename of your ISO? Is it really *.ISO" or is it "*.iso"? Because if the filename you pass in through "file" to Player.Open doesn't match the real filename 100% XBMC won't be able to find the file in the database and therefore won't be able to assign any metadata to it. In the GUI this can't happen because the item you play comes from the database with all the proper information. Ah, you are a wise man. I had changed the extension on that particular file to lower case to test the previous bug and never updated MyMovies which is the source of the file name I am passing using Player.Open. So basically the file extension I was passing had the wrong case, and did not match. Thank you. BTW, the reason for this whole caps extension thing is MyMovies. When it creates an ISO it uses a caps extension for the file name. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - kevinkelm - 2013-01-06 (2013-01-05, 12:18)Montellese Wrote:(2013-01-05, 12:12)kevinkelm Wrote: That's great thanks. Would this work for toggling subtitles on and off? Thanks guys, just one more question. Is there a command to set watched status? I don't see one in the docs. Thanks! RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - N3MIS15 - 2013-01-06 VideLibrary.SetMovieDetails {"id":0,"jsonrpc":"2.0","method":"VideoLibrary.SetMovieDetails","params":{"movieid":1,"playcount":1}} (untested) RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - johnsills1 - 2013-01-06 Is there somewhere that I can learn this JSON jargon... I'm trying to create a command to go to Movies, Music, and TV Shows from anywhere in XBMC.... For instance, if I'm on the setup screen, I want to be able to immediately goto the Movies screen with a command.....Any help would be appreciated as well as a detailed description JSON and how it works. I know that my be asking alot, but I am having a lot of trouble figuring it out on my own. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2013-01-06 Most links to JSON-RPC related pages are available on the wiki page. For your specific question you want to look at the GUI.ActivateWindow command and for a list of existing windows take a look at Window IDs (wiki) and Opening Windows and Dialogs (wiki). RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Millencolin007 - 2013-01-06 Hi, When adding items from an addon to the "now playing" playlist over json-rpc, the thumbnail often doesn't get added and the label is calculated from the stream url (and is often empty) . This is probably because the file is not in the library and is added using Playlist.Add (with "file" parameter) and xbmc cannot resolve the label and thumbnail from the http url, which is understandable. xbmc probably passes the thumbnail and label to the playqueue when it is played from the plugin directly. Would it be possible to add a thumbnail and label parameters (or maybe even more metadata) to Playlist.Add when using the "file" option to queue an item to bypass this problem? Example where you can see the problem: Adding a stream from the addon "digitally imported" to the playqueue using xbmc shows the thumbnail and proper label, adding the same using json-rpc shows a part of the http url and no thumbnail. Should I open a feature request for this? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Ayla - 2013-01-06 Can I use JSON-RPC with keymaps? If yes, which keymap file should I use (is it keyboard.xml)? For example when I send the Input.Action "left" command, I would like it to do something different when playing back fullscreen video. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - N3MIS15 - 2013-01-06 (2013-01-06, 23:21)Ayla Wrote: Can I use JSON-RPC with keymaps? Nope, the Event Server is best for keymaps. There are some examples is the XBMC srource: https://github.com/xbmc/xbmc/tree/master/tools/EventClients/examples RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2013-01-06 (2013-01-06, 23:05)Millencolin007 Wrote: Hi,This is more of a problem on how or rather when XBMC retrieves the details for an item. When you view it in the GUI, it gets the details directly from the plugin and has it available when you queue it. Through JSON-RPC there's only the filename/stream URL and it doesn't look up the information. IMO there should be some logic to retrieve those details before adding the item to the playlist but I'm not sure if that's even possible with plugins right now (i.e. retrieving details for a single item). (2013-01-06, 23:21)Ayla Wrote: Can I use JSON-RPC with keymaps?I'm not sure I follow. JSON-RPC's Input.* methods do not care about keymaps as they already execute actions (and not keypresses). So when you send Input.Action "left" it will do whatever happens for the "left" action and not for the "left" key. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Ayla - 2013-01-07 (2013-01-06, 23:57)Montellese Wrote:(2013-01-06, 23:21)Ayla Wrote: Can I use JSON-RPC with keymaps?I'm not sure I follow. JSON-RPC's Input.* methods do not care about keymaps as they already execute actions (and not keypresses). So when you send Input.Action "left" it will do whatever happens for the "left" action and not for the "left" key. Can I achieve what I want by sending keypresses for all my commands instead of Input.Action etc., and still use JSON-RPC? For example, send key "a" to go left (under global in keyboard.xml) and use "a" to rewind (under fullscreenvideo in keyboard.xml) If so, could you post the command line I need to use to send keypress "a" with JSON? Thanks again RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - johnsills1 - 2013-01-07 (2013-01-06, 13:07)Montellese Wrote: Most links to JSON-RPC related pages are available on the wiki page. Thanks for the info, but I am stilled confused about JSON RPC. Those pages gave me no insight on how to write the JSON command Also, doesn't the bit about Opening Windows and Dialogs where it talks about the Built In Function only exist for HTTP control and not JSON? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - kevinkelm - 2013-01-07 (2013-01-06, 07:27)N3MIS15 Wrote: VideLibrary.SetMovieDetails I'm getting this error using this code 22:35:16 T:4629241856 DEBUG: JSONRPC: Incoming request: {"id":0,"jsonrpc":"2.0","method":"VideoLibrary.SetMovieDetails","params":{"movieid":1,"playcount":1}} 22:35:16 T:4629241856 DEBUG: JSONRPC: Calling videolibrary.setmoviedetails 22:35:16 T:4629241856 DEBUG: JSONRPC: Type mismatch in type RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2013-01-07 (2013-01-07, 11:49)kevinkelm Wrote:(2013-01-06, 07:27)N3MIS15 Wrote: VideLibrary.SetMovieDetails It's not an error, it's a debug message that might help you find a problem with your request if the response is an error. As long as you don't get a JSON-RPC error response, there's no need to look into the log for these log messages RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Ayla - 2013-01-07 (2013-01-07, 00:51)Ayla Wrote:(2013-01-06, 23:57)Montellese Wrote:(2013-01-06, 23:21)Ayla Wrote: Can I use JSON-RPC with keymaps?I'm not sure I follow. JSON-RPC's Input.* methods do not care about keymaps as they already execute actions (and not keypresses). So when you send Input.Action "left" it will do whatever happens for the "left" action and not for the "left" key. Montellese; Should I use Input.SendText for this or will it only work for navigation (I see Permissions: Navigation listed)? |