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 - Tolriq - 2012-08-28 A small remark about introspect : Code: "List.Limits": { After not understanding why my code did not work it seems end is really the end and not the number of items we want it perhaps needs a little update of this description. Edit : And having a default to -1 to mean all but need a value of 0 to mean all from client side is a little disturbing. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - seadog - 2012-08-28 I'm using the JSON api to update the play counts of movies/tv episodes (I'm updating the trakt utilities script to work with frodo) and even sending multliple setmoviedetails at a time is still really slow, is there a better way to send them to speed it up, or is this operation just inherently slow? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-29 Another small remark Shouldn't the streamdetails field return an empty array instead of null to keep consistency when not available ? This is the only field that can return the null value instead of an empty one of the correct type needing adding more case handling in json streaming parsing. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-29 And an annoying bug with GetArtists, the total field is not correctly filed it's value is set to end. So no way to know the number or artists. Seems from code that it misses a few lines : Code: HandleFileItemList("artistid", false, "artists", items, param, result, false); should be Code: int size = items.Size(); And even if I don't use limits on GetGenre from code too I suppose limits are not applied to them. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - terrylau - 2012-08-30 Hi guys, been searching around but can't seem to find the solution. How do I get the actual names of all the playlists? I have 3 saved audio playlists i.e. Playlist 1, Playlist 2 and Playlist 3 Used Code: {"jsonrpc":"2.0","method":"Playlist.GetPlaylists","params":{},"id":1} Code: {"id":1,"jsonrpc":"2.0","result":[{"playlistid":0,"type":"audio"},{"playlistid":1,"type":"video"},{"playlistid":2,"type":"picture"}]} Used Code: {"jsonrpc":"2.0","method":"Playlist.GetProperties","params":{"playlistid":0,"properties":["size","type"]},"id":1} Code: {"id":1,"jsonrpc":"2.0","result":{"size":20,"type":"audio"}} Seems like I'm missing some properties or I'm using the wrong methods to get the playlists' labels. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Millencolin007 - 2012-08-30 (2012-08-30, 06:20)terrylau Wrote: Hi guys, been searching around but can't seem to find the solution. How do I get the actual names of all the playlists? I have 3 saved audio playlists i.e. Playlist 1, Playlist 2 and Playlist 3 There is no specific json method to retrieve the playlists. The functions are for the "play queue" and not for playlists in xsp or m3u format. But you can get the playlists using Files.GetDirectory: Code: curl -d "{\"jsonrpc\": \"2.0\", \"method\": \"Files.GetDirectory\", \"params\" : { \"directory\" : \"special://musicplaylists\" }, \"id\" : 1 }" http://10.0.0.127:8080/jsonrpc Then you can use Files.GetDirectory on the returned items to get the content of the playlists RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-08-30 Can anyone point out where I've gone wrong with: Code: { "filter": RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-08-31 Hi, Is it possible to have feedback for available audio track movies. Want send JSON command, and parse which audio channel available for movies RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-31 @Mizaki : the only thing I think of is that year is int so should not have the "" . @yallah: just request for the properties "streamdetails" in VideoLibrary.GetMovies, there's plenty of sample for the GetMovies in this thread RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-31 Is a Playlist.Move function in the plans ? Because from what I understand currently we need to do a remove / insert, and while remove is easy, insert needs analysis of previous getItems to then send the correct insert statement depending on the media since we can't just send back the full item. Or perhaps I missed something ? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-08-31 (2012-08-31, 10:14)Tolriq Wrote: @yallah: just request for the properties "streamdetails" in VideoLibrary.GetMovies, there's plenty of sample for the GetMovies in this thread Oh Thx RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-08-31 last question... why when I send Json for album, some have good extension (.jpg) for thumbnail and other have thubnail with extension .mp3. Just want know if prob come from scraper or json ? Thx Exemple : { "id": 1, "jsonrpc": "2.0", "result": { "albums": [ { "albumid": 1, "artist": [ "Akon" ], "fanart": "image://http%3a%2f%2ffanart.tv%2ffanart%2fmusic%2f1138a764-2212-4d0a-b02d-0dc14df91e08%2fartistbackground%2f25199%2fakon-4f74ad8903235.jpg", "label": "In My Ghetto", "thumbnail": "image://http%3a%2f%2fuserserve-ak.last.fm%2fserve%2f300x300%2f26039299.jpg", "title": "In My Ghetto" }, { "albumid": 2, "artist": [ "Akon" ], "fanart": "image://http%3a%2f%2ffanart.tv%2ffanart%2fmusic%2f1138a764-2212-4d0a-b02d-0dc14df91e08%2fartistbackground%2f25199%2fakon-4f74ad8903235.jpg", "label": "In My Ghetto [Vol 02]", "thumbnail": "image://music@smb%3a%2f%2fDISKSTATION%2fmusic%2fAkon%20-%20Discography%205%20Albums%2fAkon%20-%20In%20My%20Ghetto%20%5bVol%2002%5d%20%5b2008%5d%2f01%20%20Akon%20-%20Still%20Runnin%20%5bFeat.%20Tupac%5d.mp3", "title": "In My Ghetto [Vol 02]" } ], "limits": { "end": 2, "start": 0, "total": 2 } } } RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - grywnn - 2012-08-31 (2012-08-31, 13:01)Tolriq Wrote: Is a Playlist.Move function in the plans ? I ran into the same problem, solved this by doing multiple swaps - for moving an item from position 3 to position 6 for example i swap 3 and 4, then 4 and 5, then 5 and 6. But a Playlist.Move woud be highly appreciated RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-31 @yallah : this is normal with last json, you don't have to check the extension returned, you will still get a valid image in png format. @grywnn : I finally found an easier way I insert a dummy item at the to position from the file of from item so that always work, then I swap the good from item with the dummy item then I delete the dummy item. That way no problem of multiple swaps. (Of course the to position needs adjustment from > to is different than from < to). But I must also admit that a notification of playlist changed would be cool because those multiple changes makes keeping sync hard to follow in case of problems. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-08-31 (2012-08-31, 15:13)Tolriq Wrote: @yallah : this is normal with last json, you don't have to check the extension returned, you will still get a valid image in png format. thx for your reply, But if I want thumbnails, I must replace .mp3 or had .png ? thumbnail": "image://music@smb%3a%2f%2fDISKSTATION%2fmusic%2fAkon%20-%20Discography%205%20Albums%2fAkon%20-%20In%20My%20Ghetto%20%5bVol%2002%5d%20%5b2008%5d%2f01%20%20Akon%20-%20Still%20Runnin%20%5bFeat.%20Tupac%5d.mp3" |