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
|
albumartist - marksoccer - 2011-03-25 Is there any way to only get album artists rather than all artists? I know this can be done in XBMC GUI, but I can't figure out a way to do this through the current JSON implementation. - carmenm - 2011-03-26 Montellese Wrote:IMO you'll always have to consider the possibility that the library is updated while your remote device is not connected with XBMC using JSON RPC. In that case there's no way around a complete sync anyway.Yes i think i am going with this. About fields: - i really need new flags, especially watched and dateAdded. I know you can only code when you have free time, so i am willing to do it myself. Could you guide me on how to add a field to GetMovies function? - it seems when looking at the code that "cast" should return the cast list for a movie, but i get a null value. is this normal? Thanks for you great work. XBMC Json is really great. - Montellese - 2011-03-26 You can get the watched status by using the "playcount" field which gives you even more information than simply watched/unwatched. DateAdded doesn't exist IMO and you'd have to extend the movie and episode database table for it. Yes "cast" currently returns null but this will be fixed in the next version of json rpc. But getting the cast for every movie with GetMovies is very slow. - wuench - 2011-03-26 carmenm Wrote:I have a question. I am trying to send a switch show OSD command when playing. I have recently switched to using SendKey instead of raw actions via HTTP. I like it better as it preserves the sound effects and the keys are mapped via the keyboard.xml depending on the context (and are remappable by the end user). So if you use sendkey you can just send the OSD keycode. I am also using System.GetInfoLabels, I use the ListItem.xxx labels to get info when a movie is not playing and the VideoPlaylist.GetItems when the videoplayer is active. GetInfoLablels is mostly blank when a movie is playing and unfortunately I think there is currently a bug and some of the info is not returned via the VideoPlaylist.GetItems labels (like Thumb). I haven't narrowed it down yet. There is also System.GetInfoLabels VideoPlayer.xxx labels, I am not sure if/how well they work. If I remember right I couldn't get the thumbnail there either using VideoPlayer.Cover. All valid infolabels can be found here. Code: [b]SendKey command for OSD[/b] - carmenm - 2011-03-27 Thanks a lot for all those info. I have a problem with the OSD SendKey command. It s not a show/hide key. The return first shows the osd then select the currently highlighted button. What i would like is a show/hide command. I know of softwares that does that. Do you know another keyboard shortcut to show/hide the osd? Thanks - wuench - 2011-03-28 I don't think there is an action for OSD toggle unless Action(83) does it. I think normally you would send a ShowOSD and then a CloseDialog or something to close it. Two different actions, which you might be able to map to the same key in keyboard.xml under different contexts. - carmenm - 2011-03-29 Actually i found a iphone application that does show/hide osd with a button. And it s not a button sending two differents key(at least i think) because if i show the osd using the mouse, the button hides it. But maybe i can use JSON to know if the OSD is open? yet i didnt see any infoLabel that would do that EDIT: got it! the solution was key 274! Sorry for being out of topic - carmenm - 2011-03-30 I am using http interface "GetCurrentlyPlaying" to get info on the currently plyaing object(easy and one call) But i would like to use VideoLibrary.GetMovieDetails over the information i get from "GetCurrentlyPlaying". My problem is that "GetCurrentlyPlaying" doesnt give me the movieid. I only get the filename. Is it possible to recover a movieid using its filename? Thanks - topfs2 - 2011-03-30 carmenm Wrote:I am using http interface "GetCurrentlyPlaying" to get info on the currently plyaing object(easy and one call) Nope. Don't think there ever will be, you really should not be using cross API calls, I'd suggest moving entirely - carmenm - 2011-03-30 Actually GetCurrentlyPlaying is the only function i use (except for SendKey) Is there an example somewhere on how to get CurrentlyPlaying info through JSON? Thanks - Montellese - 2011-03-31 carmenm Wrote:Is there an example somewhere on how to get CurrentlyPlaying info through JSON? First call "Player.GetActivePlayers" to determine the currently active player (audio, video or picture). If it is audio or video call Audio/VideoPlaylist.GetItems and read the "current" field to get the position of the currently playling item in the playlist. The "items" field contains an array of all items in the playlist and "items[current]" is the currently playing file. You can also tell jsonrpc which fields to return for every item in the playlist and therefore you'll have all the information you need. - Kabooga - 2011-04-01 Looking through the repository (tip) I see there's an API for CAudioLibrary::GetGenres. Will this functionality be brought to Dharma? - topfs2 - 2011-04-01 Kabooga Wrote:Looking through the repository (tip) I see there's an API for CAudioLibrary::GetGenres. Will this functionality be brought to Dharma? We will not alter the API of an already stable release - Kabooga - 2011-04-01 Quote:Originally Posted by topfs2 That makes sense. Will that functionality be in release 11 then? - topfs2 - 2011-04-01 Hard to say, as we haven't set a real date for eden just yet but so far extra announcements have gone in so that should be much more useful now. Another really big one is the one Montellese have kindly been working on, which is full conformity with jsonrpc 2.0 spec and the all new Json Schema Descriptor, which makes the code more stable but also easier to understand from a client perspective. (Introspect explains everything you may want to know about the methods). |