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 - 2012-08-09 (2012-08-09, 00:59)Martijn Wrote:What he said.(2012-08-09, 00:55)dwagner Wrote:(2012-08-06, 13:37)Montellese Wrote: THESE CHANGES BREAK BACKWARDS COMPATIBILITY WITH VERSION 4 OF JSON-RPC API!!!I grew to like the old "/" separated arrays I wish you would have made a parameter option to query using the old delimited array or rather the other way around so as not to completely break backward compatibility. I cache this data to a file in my remotes, so adding a loop for multiple parameters in each movie is more costly (thankfully this is only done once). (2012-08-09, 01:11)N3MIS15 Wrote: is there any way to set thumbnail/fanart for movie sets and seasons over json api?No there isn't. I'll have to look into it but I can't promise anything as both movie sets and seasons are special concepts (in the way they are implemented) in XBMC. (2012-08-09, 02:44)dwagner Wrote: I'm getting a crash every time I try run JSONRPC.Introspect (latest build: xbmc-20120808-0531bbf-master-x86_64)Just tried it with the latest nightly build and I didn't have any problems. Concerning Trac your username should be the same as in the forums. Not sure about the password but might be the same as well. (2012-08-09, 03:55)dwagner Wrote: I have a question regarding the new image URL's provided by JSON API 5. Are these URL's temporary. In other words, if I query a movie save the URL, and only try retrieve the image via the image:// URL a few days and many other queries later, will it still work.They are valid as long as the image doesn't change. The image path you get from JSON-RPC is the path to where the image actually came from. If you change the image it is very likely that it will come from a different origin and therefore the path will change. (2012-08-09, 07:14)N3MIS15 Wrote: The introspect shows year, originaltitle and imdbnumber as valid properties for VideoLibrary.SetTVShowDetails but none of them seem to work. Are they even sure they're supposed to be in there? You are right that year doesn't make sense for tvshows. But originaltitle and imdbnumber (which in this case is most likely an identifier from tvdb) should be set when you provide it. I just tested it and it seems like none of the properties can currently be changed with SetDetailsForTVShow (haven't tried the others yet). I'll look into it ASAP. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-09 (2012-08-09, 00:59)Martijn Wrote:(2012-08-09, 00:55)dwagner Wrote:(2012-08-06, 13:37)Montellese Wrote: THESE CHANGES BREAK BACKWARDS COMPATIBILITY WITH VERSION 4 OF JSON-RPC API!!!I grew to like the old "/" separated arrays I wish you would have made a parameter option to query using the old delimited array or rather the other way around so as not to completely break backward compatibility. I cache this data to a file in my remotes, so adding a loop for multiple parameters in each movie is more costly (thankfully this is only done once). Is there any list of the planned changed that will break compatibility ? Since some of us use databases to get local copy of data some changes generates quite a lot of impact (not necessarily bad thing since for example genre as array for movies are good). But changing database schema each month can be problematic, if we know about some other incoming big changes we can postpones the databases changes to later and for now redo the concatenation. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-09 (2012-08-09, 11:31)Tolriq Wrote: Is there any list of the planned changed that will break compatibility ? To be honest I don't plan that far ahead. I never know how much time I have to work on XBMC and new ideas are usually spontaneous. There are two actions that I can predict and those are removing HTTP-API and removing the VFS handler of the webserver. I know that supporting a moving target (which is what JSON-RPC is between stable releases) can be a pain that's why we kept JSON-RPC backwards compatible for a while now so that you guys could start adapting to the new features first before having to deal with major changes in the API. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-09 (2012-08-08, 20:31)Mizaki Wrote: I can't see a ticket for this one. But first... Just tested that exact query on latest master and the sorting works perfectly fine. I get alphabetical sorting starting with "Action" (genreid = 4) then "Adventure" (genreid = 2) and so on. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-09 (2012-08-09, 10:17)Montellese Wrote:(2012-08-09, 07:14)N3MIS15 Wrote: The introspect shows year, originaltitle and imdbnumber as valid properties for VideoLibrary.SetTVShowDetails but none of them seem to work. Are they even sure they're supposed to be in there? I made a mistake while testing and setting originaltitle and imdbnumber works fine for me. I have removed the "year" parameter because it doesn't make any sense. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Romep - 2012-08-09 Hello, GetActivePlayers returns a list of players. In which case can there be more than one? I tried to get more than one but wasn't able to. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Millencolin007 - 2012-08-09 (2012-08-09, 15:55)Romep Wrote: Hello, If you have a slideshow playing and listening to music for example RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-09 For the moment you can only have musicplayer and pictureplayer at the same time. Like listening to music and the screensaver starts. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-08-09 (2012-08-09, 11:49)Montellese Wrote:(2012-08-08, 20:31)Mizaki Wrote: I can't see a ticket for this one. But first... It was me (as usual). Sort wasn't in the param brackets RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Millencolin007 - 2012-08-09 (2012-08-09, 11:43)Montellese Wrote:(2012-08-09, 11:31)Tolriq Wrote: Is there any list of the planned changed that will break compatibility ? I understand that you want to remove the VFS handlers since it is a security risk and allows you to download almost any file from xbmc. Currently the only way to retrieve audio playlists from xbmc is using the url special://musicplaylists. Is this also part of the vfs handlers and will there be an alternative after removing the handlers? Will it still be possible to download/stream a file from xbmc using the url returned by Files.PrepareDownload, since today this function returns a vfs url and I am using those urls in my app to stream music files to android devices? Will there be an alternative url? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Millencolin007 - 2012-08-09 I am not sure if I already asked this before but AudioLibrary.GetAlbumDetails and AudioLibrary.GetSongs do not return the artistId in the json response of nightly builds whereas in Eden the artistId was returned with the same request. "{\"jsonrpc\": \"2.0\", \"method\": \"AudioLibrary.GetSongs\", \"params\" : { \"properties\" : [\"title\", \"artist\", \"genre\", \"album\", \"track\", \"thumbnail\", \"file\", \"duration\", \"rating\", \"albumid\", \"artistid\", \"albumartist\"] }, \"id\" : 1 }" "{\"jsonrpc\": \"2.0\", \"method\": \"AudioLibrary.GetAlbumDetails\", \"params\" : { \"albumid\" : %s , \"properties\": [ \"title\", \"description\", \"artist\", \"genre\", \"theme\", \"mood\", \"style\", \"type\", \"albumlabel\", \"rating\", \"year\", \"musicbrainzalbumid\", \"musicbrainzalbumartistid\", \"fanart\", \"thumbnail\", \"artistid\"]}, \"id\" : 1 }" RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-09 (2012-08-09, 22:54)Millencolin007 Wrote: I understand that you want to remove the VFS handlers since it is a security risk and allows you to download almost any file from xbmc. Files.PrepareDownload will fail on anything except cached images. The problem with access to media files is that it is very difficult to draw a line of what should be accessible and what not. Every user would probably provide you with a different answer so for now only providing access to the cached images is the safest solution. Hopefully there will be ways to access media files managed by XBMC in the future but we haven't thoroughly discussed this yet. (2012-08-09, 23:11)Millencolin007 Wrote: I am not sure if I already asked this before but AudioLibrary.GetAlbumDetails and AudioLibrary.GetSongs do not return the artistId in the json response of nightly builds whereas in Eden the artistId was returned with the same request. night199uk is working on re-organizing the musicdatabase. The problem with the "artistid" is/was that an album can have more than one artist but the artistid only returned one value. As a "replacement" you can now call AudioLibrary.GetArtists with a "filter" parameter containing either a "albumid" property or a "songid" property (which is not possible in Eden) and you'll get a list of all artists of a specific album/song. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - dwagner - 2012-08-10 (2012-08-09, 10:17)Montellese Wrote:The problem is with the OSX build. I tried the latest OSX and Windows builds. The OSX build crashed on JSONRPC.Introspect and the Windows build did not. There are other JSON commands that crash for me on OSX. I read an earlier post where you mentioned you are going to try and test on OSX, so I guess it will be sorted once you get a chance to do that.(2012-08-09, 02:44)dwagner Wrote: I'm getting a crash every time I try run JSONRPC.Introspect (latest build: xbmc-20120808-0531bbf-master-x86_64)Just tried it with the latest nightly build and I didn't have any problems. Concerning Trac your username should be the same as in the forums. Not sure about the password but might be the same as well. I've come right with my trac account again. Though if you already have a trac about the OSX JSON then there is no need for me to post a new issue. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - doozer - 2012-08-10 Can anyone point out what I'm doing wrong here? I've simplified the call as much as possible. The tvshowid is valid and was returned by a previous call to VideoLibrary.GetEpisodes. Code: {"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShowDetails", "params": {"tvshowid": 1882,"properties": ["title"]}, "id": "VideoLibrary.GetTVShowDetails"} Returns: Code: {"error":{"code":-32602,"message":"Invalid params."},"id":"VideoLibrary.GetTVShowDetails","jsonrpc":"2.0"} Using the official Eden release on PC. Thanks, Matt. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - dwagner - 2012-08-10 (2012-08-10, 04:31)doozer Wrote: Can anyone point out what I'm doing wrong here? I've simplified the call as much as possible.I've copy pasted your code and tested it on my OSX XBMC Eden (I just changed the tvshowid to a valid one in my library) and it worked perfectly for me. The only time I got the error you mentioned was when I put an invalid tvshowid. |