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
|
- carmenm - 2011-06-24 Montellese Wrote:I just made a few commits to fix a few bugs and add new functionality. There are two new methods Export and Clean in AudioLibrary and VideoLibrary and ScanForContent has been renamed to Scan. Furthermore the "thumbnail" field is now always returned when it is requested even if it's empty. Wow great news!. Thanks a lot for that one! I have a question about "Now Playing" in XBMC, what is the equivalent in JSON. I mean is it : if (VideoPlayerAvailable) return VideoPlaylist.GetItems else if (AudioPlayerAvailable) return AudioPlaylist.GetItems Did i get it right? - Montellese - 2011-06-24 What exactly does pfeifer Wrote:Don't work.mean? Do you get an error in the jsonrpc response or does the video not start playing in XBMC or something else? - Montellese - 2011-06-24 carmenm Wrote:Wow great news!. Thanks a lot for that one! Yeah you basically call Player.GetActivePlayers. From the response you get you can determine whether the video or the audio player is active. Based on that you call VideoPlaylist.GetItems or AudioPlaylist.GetItems and use the "current" attribute you get in the result to determine the index of the currently playing item in the list of items also returned by GetItems(). - pfeifer - 2011-06-24 Montellese Wrote:What exactly does Of course, don't start in XBMC and this is the response: Code: { if I try this one Code: { this is the answer Code: { - Montellese - 2011-06-24 OK the problem with your first request are the backslashes in the path. Python needs you to escape a backslash so you use "\\" to get "\" in the end. But jsonrpc also expects a backslash to be escaped so in your case you probably need to do "\\\\" to get "\\". Furthermore in the latest nightlies the XBMC.Play method only takes a "file" parameter and nothing else which is why your second request fails and tells you "Too many parameters". - pfeifer - 2011-06-25 Ok, I changed to Putty for check it this command work fine (local file and smb file) Now I have to manage python conversion of file name stored in XBMC and my script. Thanks a lot Pfeifer - Nick8888 - 2011-06-25 topfs2 Wrote:Well it has been discussed and it all comes down to that reading the backbuffer at a significant speed takes up way to much resource so you'd get a significant impact on the htpc. Also transfering the screenshots / movie thing will take alot of bandwith and adding compression to that would probably not be beneficial since it will take even more cpu cycles on both client and htpc, although it would be needed to be investigated. Is it still unlikely we will see a screenshot method anytime soon? - pilluli - 2011-06-26 Hi guys, I was in the process of updating a python script to use the JSON-api instead of the deprecated http-api but I run into some problems/difficulties. I've got a couple of questions: 1. Is it possible to access the list of video bookmarks form the DB and the info (episode or movie) associated with it? If not, is there a plan to add this query? 2. Could someone point me at a guide or some source code of python scripts using the JSON api? I seem to be struggling to find info and examples of this... best regards and thanks for your work on this API!! - giftie - 2011-06-27 pilluli Wrote:2. Could someone point me at a guide or some source code of python scripts using the JSON api? I seem to be struggling to find info and examples of this... I can tell you of two... cdART Manager and Cinema Experience.. cdART Manager - Source Cinema Experience(dev) - Source They both have a file called 'json_utils.py' which contain some code accessing the Database for info. Any questions on how and why feel free to PM. - carmenm - 2011-06-27 @Montellese: i saw that you added the thumbnails for cast. Thank you! Will try it as soon as possible. - Montellese - 2011-06-27 carmenm Wrote:@Montellese: i saw that you added the thumbnails for cast. Thank you! Will try it as soon as possible. You're welcome. You will not get a thumbnail though if there is none cached by xbmc. - carmenm - 2011-06-27 Montellese Wrote:You're welcome. You will not get a thumbnail though if there is none cached by xbmc. Of course - pilluli - 2011-06-27 giftie Wrote:I can tell you of two... cdART Manager and Cinema Experience.. Thank you giftie, that is exactly what I was looking for. Does anyone know if it is possible to access the list of video bookmarks from the DB and the info (episode or movie) associated with it?? Regards, Sorting - thedroid - 2011-06-29 It appears that sorting by title does not work (using xbmc 11.0-git20110629.a401db7) Code: {"id":7,"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"fields":["title"],"limits":{"start":0,"end":3} ,"sort":{"method":"title","order":"ascending","ignorearticle":false}}} incorrectly produces Code: {"id":7,"jsonrpc":"2.0","result": whereas Code: {"id":7,"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"fields":["title"],"limits":{"start":0,"end":3} ,"sort":{"method":"label","order":"ascending","ignorearticle":false}}} correctly produces Code: {"id":7,"jsonrpc":"2.0","result": Is this a known issue? - Montellese - 2011-06-29 thedroid Wrote:It appears that sorting by title does not work (using xbmc 11.0-git20110629.a401db7) That is because you have to use the "videotitle" sort method and not the "title" sort method for videos. I know it's not very intuitive but that's the way it currently is. |