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
|
- staeff - 2010-12-30 Montellese Wrote:You are missing to correct parameters to the System.GetInfoLabels method. You need to provide an array containing the labels you would like to retrieve Thanks! It's working now. Do you know, if and how I can receive all controls of a window? Edit: 2nd Question: getCurrentWindow() doesn't show the "Videos" - menu name - do you know this problem? - Montellese - 2010-12-30 staeff Wrote:Do you know, if and how I can receive all controls of a window?Not that I know of but you can check all available InfoLabels heere: http://wiki.xbmc.org/index.php?title=InfoLabels staeff Wrote:getCurrentWindow() doesn't show the "Videos" - menu name - do you know this problem? Uhm what is getCurrentWindow() and what skin are you using? - staeff - 2010-12-30 Thanks for the link. I'll try the promising ones.. Montellese Wrote:Uhm what is getCurrentWindow() and what skin are you using? It's just an empty String, and I'm using Confluence - the built in one of the release version.. (I'm going to check some other versions) - Montellese - 2010-12-30 I actually meant "What do you mean by "getCurrentWindow()?". Where did you find that function or is it even a function? - staeff - 2010-12-31 Montellese Wrote:I actually meant "What do you mean by "getCurrentWindow()?". Where did you find that function or is it even a function? Ah, ok. The function just sends a rpc call like this: Code: "{"id":497,"jsonrpc":"2.0","method":"System.GetInfoLabels","params":["System.CurrentWindow"]}" the answer for "videos" is: Code: "{ here is an answer for "music" Code: "{ - Montellese - 2010-12-31 I have no idea sorry. Maybe an XBMC dev familiar with the skinning engine or a skinner might be able to answer that question. - bartdesign - 2011-01-01 I've been playing with the VideoLibrary.GetRecentlyAddedEpisodes method. And i've encountered a problem. I need to get the tv show thumbnail instead of the episode thumbnail. But the GetRecentlyAddedEpisodes does not return a show string or an id reference to the tv show. Does XBMC's database carry a reference to the tv show? If so could we add the show id or label in the return array of episodes in the VideoLibrary.GetRecentlyAddedEpisodes method? Maybe it's already there and i'm overlooking something? Where to find a list of fields for JSON RPC calls that support the use of fields? - giftie - 2011-01-03 Since JSON RPC is going to replace HTTP API(eventually) and it's ease to parse for information I have been using JSON RPC calls in the scripts I currently am working on. I know it is still in flux as development continues. I have been looking through the source code for XBMC. I am having a tough time finding the location that would give me an idea of what fields are available for certain JSON RPC calls. I have found a few by luck and chance. I wouldn't mind helping out documenting JSON RPC calls in the Wiki and even the source code. All help is appreciated.. - topfs2 - 2011-01-03 giftie Wrote:Since JSON RPC is going to replace HTTP API(eventually) and it's ease to parse for information I have been using JSON RPC calls in the scripts I currently am working on. I know it is still in flux as development continues. Hopefully we will add this data to the introspect at some point but for now its in CVideoInfoTag::Serialize and CMusicInfoTag::Serialize they can be found in files xbmc/VideoInfoTag.cpp and xbmc/MusicInfoTag.cpp - giftie - 2011-01-03 topfs2 Wrote:Hopefully we will add this data to the introspect at some point but for now its in CVideoInfoTag::Serialize and CMusicInfoTag::Serialize they can be found in files xbmc/VideoInfoTag.cpp and xbmc/MusicInfoTag.cpp Awesome.. Thank you very much... AudioPlaylist.Add does not work properly - vaton4 - 2011-01-03 Code: {"id" : 5, Code: {"jsonrpc":"2.0", "method":"AudioPlaylist.GetItems", "id":5} As you can see, they are not. Comparing each other, I get quite different "label" parts. First item is result of the JSONRPC command: Code: {"jsonrpc":"2.0", "method":"AudioPlaylist.Add", "params": {"file": "D:/someMusic/someAlbum/someFile.flac"}, "id":1} Code: command=AddToPlayList(D:/someMusic/someAlbum/;0;[Music];1) Third item is result of the xHTTP command: Code: command=AddToPlayList(D:/someMusic/someAlbum/someFile.flac;0;[Music];1) Further, command: Code: {"jsonrpc":"2.0", "method":"AudioPlaylist.Add", "params": {"file": "D:/someMusic/someAlbum/"}, "id":1} Code: {"id" : 5, mixed encodings in filenames - grywnn - 2011-01-04 I've just run into an issue concerning filenames. When doing a VideoLibrary.GetMovies i get (among many others) Code: { Note that the filename contains a UTF8 char (ö = ö) as well as a ISO char (the "ö" near the end). This combination kills the Ocj-C JSON parser i'm using (YAJL). I've implemented a workaround in my client by interpreting the JSON answer as Latin1, and trying to interpret each result string as utf8 afterwards, falling back to the Latin1 encoded result if the conversion to utf8 fails. Unfortunately i can't really tell wether the problem is located with JSON, with XBMCs filehandling, or maybe even on the filesystem. Is this known? Maybe even by design? Edit: Just found the same issue was discussed a few pages earlier. Damn, this thread is getting long... - litemotiv - 2011-01-05 I'm having a lot of trouble doing a simple rpc call with mootools javascript. Hopefully someone can shed some light. This is my basic request: Code: jsonRequest = new Request.JSON( It errors out with a parse error, so something must be malformed, but i can't figure out what. I've tried with and without params, putting them in an array and whatnot, but i keep getting the same result. Any ideas? - Montellese - 2011-01-05 I replaced all ' with " and sent the request over TCP and it worked (with ' it failed). But I don't know what mootools does with the json object you provide. EDIT: Just checked the json specification and it says strings must be delimited by ". Quote:A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes - litemotiv - 2011-01-05 Montellese Wrote:I replaced all ' with " and sent the request over TCP and it worked (with ' it failed). But I don't know what mootools does with the json object you provide. Thanks for your reply Montellese. Unfortunately, replacing all the single quotes still gives a parse error. The mootools request object is also using single quotes internally though, so i'm not sure if there still is a problem there in some way: https://github.com/mootools/mootools-core/blob/master/Source/Request/Request.js |