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
|
- khargy - 2011-10-09 Ok, so this is interesting... sometimes when I called my video playlist I would use "path" and sometimes I would use "file", so: Code: { "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "path": "special://profile/playlists/video/all videos.m3u" } }, "id": 1 } Code: { "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "file": "special://profile/playlists/video/all videos.m3u" } }, "id": 1 } if I use "file" it plays the video in order, but if I use "path" it plays them randomly... but with "path" it seems to be playing them in player ID 2 which, if I understand things correctly is the picture player. Although I'm still getting the issue where on the 2nd play it'll get stuck on the GUI - sometimes it'll say "loading" forever, but if I just send the play.open command again it'll go. - Montellese - 2011-10-09 khargy Wrote:So after I called player.open for the video playlist I called:I'll have to investigate this later. I only tried it with playlist I created within XBMC (using the "Queue" option from the context menu) and there it worked fine. khargy Wrote:Ok, so this is interesting... sometimes when I called my video playlist I would use "path" and sometimes I would use "file", so: Yeah the "path" parameter is meant for slideshows only whereas the "file" parameter can take any kind of media (but not a directory full of media files in which case you should use the "directory" parameter instead of the "file" parameter). - grywnn - 2011-10-10 Just noticed that Files.getSources no longer returns a file/directory name per source, only a label (XBMC OS X, build from 10/09). Pretty useless this way Got no time to open a ticket, but can do tomorrow if necessary. BTW Player.getItem is GREAT! - Montellese - 2011-10-10 grywnn Wrote:Just noticed that Files.getSources no longer returns a file/directory name per source, only a label (XBMC OS X, build from 10/09).Thanks for the report. I fixed it in https://github.com/xbmc/xbmc/commit/69ea94f3f485e2f5530c6b122c1ad1b07f8cffa4 so should be fixed in the nightly of tomorrow or the day after tomorrow. grywnn Wrote:BTW Player.getItem is GREAT!Glad to hear that. - grywnn - 2011-10-10 You're my hero Thanks! - joshua.lyon - 2011-10-11 Montellese Wrote:As you can see we already had to break backwards compatibility for all those namespaces just to get a clean API on which we can build in the future without having to break backwards compatibility again. topfs2 Wrote:The API is far from backwards compat already in the move from v2 -> v4 (even if not great changes), thus we decided that we might aswell do ALL non-backwards compat changes which has bugged us. This to make less changes (perhaps even keep backwards compat) in the next upcomming versions. Thanks for the feedback, guys. I guess I should look at this as a blessing in disguise. It sounds like some of the things in the V2 JSONRPC APIs that have forced me to alternative APIs / methods (eg: HTTP-API) are being improved in the next release of the JSONRPC API. - Montellese - 2011-10-14 Friday, October 14th 2011: Commit: 53ee2724ede510a8a3a0
- mzanetti - 2011-10-15 Hi, Thank you once again for the work on this API. My remote control app is turning out great and has already quite a lot of users. One feature request that pops up frequently is to add things like "c" or "i" to the Input namespace to be able to open the context menu and info dialogs. Another one is the ability to downscale images on the server to be able to browse the image library using previews. Downloading the whole images and downscaling them on the client is not an option for mobile phones. What do you think? Do those features make sense and perhaps are already on your todo list? - Montellese - 2011-10-15 mzanetti Wrote:Hi,Please create a feature request ticket for these two (one ticket for each features is prefered). Another one is the ability to downscale images on the server to be able to browse the image library using previews. Downloading the whole images and downscaling them on the client is not an option for mobile phones.[/quote] That one is on the todo list and I think there already is a feature request ticket for it. Certainly something we'd like to add rather sooner than later. - jasonvp - 2011-10-16 mzanetti Wrote:Hi, I was going to suggest that also. @Montellese How long do you think the HTTP API will be in use for? Cheers Jason - Montellese - 2011-10-16 jasonvp Wrote:@Montellese We want to get rid of it ASAP after Eden has been released. I'm aware that this will cause problems with some applications that use methods that are not exposed by jsonrpc but the team decided that some of the things exposed by the http api should not be made accessible to third party applications the way it has been done by the http api (which sometimes is done through very fugly hacks) so we might have to drop some things and re-introduce them later in jsonrpc but only if we find a nice and controllable way to expose them. - othrayte - 2011-10-16 Montellese Wrote:We want to get rid of it ASAP after Eden has been released. I'm aware that this will cause problems with some applications that use methods that are not exposed by jsonrpc but the team decided that some of the things exposed by the http api should not be made accessible to third party applications the way it has been done by the http api (which sometimes is done through very fugly hacks) so we might have to drop some things and re-introduce them later in jsonrpc but only if we find a nice and controllable way to expose them. I've been meaning to speak up about this for a while, in Trakt Utilities we use the json rpc extensively but there are a few things we still need to use the httpapi for, and for all of these we are making direct requests to the db. The following are the things we are currently using it for:
What we are really after and would find useful is to be able to edit the data in the db (though I can see that we might need to discuss the correct secure way of doing this) and the second would be to be able to get a list of items when we know some detail other than the localid, liek the imdb_id or title, some kind of filtering. - Montellese - 2011-10-16 othrayte Wrote:I've been meaning to speak up about this for a while, in Trakt Utilities we use the json rpc extensively but there are a few things we still need to use the httpapi forWe are looking for any feedback we can get on what we still need to migrate from http api to jsonrpc. We cannot promise that we will migrate everything available in http api (one example is the direct db access) or in exactly the same way but if we don't even know what is missing we can't add it. othrayte Wrote:I have already done some work on this which will allow to call something like VideoLibrary.SetMovieDetails() and provide some fields and values which should be changed. It's not completely ready yet as we don't know yet how to make certain that nothing goes sideways if an application executes a call that will set invalid data, but this is something we want to make available soon after Eden has been released. othrayte Wrote:"Custom" db queries through jsonrpc have been requested a few times already. The problem is that XBMC itself doesn't really support this (apart from browsing by year, director etc). So json-rpc would have to hack around the lack in xbmc core which isn't a very good solution IMO. - othrayte - 2011-10-16 Montellese Wrote:I have already done some work on this which will allow to call something like VideoLibrary.SetMovieDetails() and provide some fields and values which should be changed. It's not completely ready yet as we don't know yet how to make certain that nothing goes sideways if an application executes a call that will set invalid data, but this is something we want to make available soon after Eden has been released.Great, I look forward to seeing this. Montellese Wrote:"Custom" db queries through jsonrpc have been requested a few times already. The problem is that XBMC itself doesn't really support this (apart from browsing by year, director etc). So json-rpc would have to hack around the lack in xbmc core which isn't a very good solution IMO.Yeah, we are moving to a fully cached system in TU, which should hopefully make TU act closer to the way XBMC expects, this should reduce or eliminate our major need for this, the real reason we currently use this is when we want to play an item and we know:
But what I'm trying to say is that future versions of TU will probably not need custom queries, but it would be helpful to do basic filtering of requests like, getMovies. VFS NFS shares - FSS_Dawid - 2011-10-16 I just found a bug. Im using the new libnfs library in xbmc and my files are mapped in XBMC using the nfs://xxx.xxx.xxx.xx/folder/file.xxx protocol the problem is that the nfs protocol is not accessible via vfs PHP Code: http://10.0.1.28:8080/vfs/nfs%3A%2F%2F10.0.1.4%2Fmnt%2Fuser%2FTVShows%2FBoardwalk%20Empire%2Ffile.xxx i get a response: File not found... from the VFS. BTW. grate Job on the JSON-RPC!!! Kind regards Dawid EDIT: Just tried to open a ticket for this problem but I can't register to trac there's just the login option... Or I'm blind O_o ? |