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-31 No you don't have to change anything, you urlencode the thumbnail value then use http://x.x.x.x:y/image/urlencoded to get the good thumb. Or the better official way you use File.PrepareDownload but not really needed for thumbs. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-08-31 Hummm little bit complicate for me, I will search File.PrepareDownload or urlencoded in the forum. thx for your help RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-08-31 Ok I use this command to send Json: {"jsonrpc": "2.0", "method": "audiolibrary.GetAlbums", "params": { "filter": { "artistid": 2 } , "properties": ["thumbnail", "title", "fanart", "artist"] }, "id": 1} and I received : { "id": 1, "jsonrpc": "2.0", "result": { "albums": [ { "albumid": 6, "artist": [ "Artistes divers" ], "fanart": "image://", "label": "Trouble [CD2]", "thumbnail": "image://music@Z%3a%5cAkon%20-%20Discography%205%20Albums%5cAkon%20-%20Trouble%20%5b2004%5d%5cCD2%5c01%20%20Akon%20-%20Belly%20Dancer%20%5bBananza%5d%20%5bFeat.%20Kardinal%20Offishall%5d%20%5bRemix%5d.mp3", "title": "Trouble [CD2]" }, { "albumid": 15, "artist": [ "Artistes divers" ], "fanart": "image://", "label": "\"Final Fantasy X-2\" Piano Collections", "thumbnail": "", "title": "\"Final Fantasy X-2\" Piano Collections" } ], "limits": { "end": 2, "start": 0, "total": 2 } } } Mys server have IP 192.168.2.29 and use default port 8080. Can you send me command http://x.x.x.x:y/image/urlencoded if i want see thumbnail in my browser for album Trouble [CD2]. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-31 come on ... I give you all needed information I don't know what language you use but you need to do in pseudo code var url = urlencode("image://music@Z%3a%5cAkon%20-%20Discography%205%20Albums%5cAkon%20-%20Trouble%20%5b2004%5d%5cCD2%5c01%20%20Akon%20-%20Belly%20Dancer%20%5bBananza%5d%20%5bFeat.%20Kardinal%20Offishall%5d%20%5bRemix%5d.mp3") httpget "http://192.168.2.29:8080/image/" + url Not really complicated RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-08-31 eheh thxxx Sorry for newb question will work on that tonight Use javascript RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-08-31 @yallah if you want JS examples https://github.com/frolick/AWX-Eden/blob/master/js/lib.xbmc.js @Tolriq thanks for having a look to check it over. I thought it was alright but it's easy to go blind on them On the year thing, yes and no. Both of these work: Code: {"jsonrpc": "2.0", "id": 1, "method": "VideoLibrary.GetTVShows", "params": { "filter": {"field": "year", "operator": "is", "value": "2010"} } } Code: {"jsonrpc": "2.0", "id": 1, "method": "VideoLibrary.GetTVShows", "params": { "filter": { "year": 2010 } } } RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - terrylau - 2012-08-31 (2012-08-30, 09:38)Millencolin007 Wrote:(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 Thanks! That works out great and I've managed to extract the labels of the playlists. A few more questions though : 1) Any commands to play the playlist? I've used the following to play Code: {"jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "file": "special://profile/playlists/music/Playlist1.m3u" } }, "id": 1} 2) How do I list out all the songs that are saved under the playlists when I select a particular playlist? I've tried Code: {"jsonrpc": "2.0", "method": "Playlist.GetItems", "params": { "playlistid":0, "properties": [ {"file":"special://profile/playlists/music/Playlist1.m3u"} ] }, "id": 1} Code: {"error":{"code":-32602,"data":{"method":"Playlist.GetItems","stack":{"message":"value does not match extended type Item.Fields.Base","name":"Item.Fields.Base","property":{"message":"Invalid type object received","type":"string"},"type":"array"}},"message":"Invalid params."},"id":1,"jsonrpc":"2.0"} TIA for the help. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-08-31 (2012-08-31, 17:11)Tolriq Wrote: come on ... I give you all needed information I try find prob, i did urlencode... When I use manual file (browse thumbnail via get thumb) and select file I have reply : "thumbnail": "image://Z%3a%5cREADERJennifer%20Lopez%20-%20Dance%20Again%20The%20Hits%5cJennifer%20Lopez%20-%20Dance%20Again%20The%20Hits%20-%20Front.bmp", and he works perfectly on Json (I can see picture in my remote). but with Tag inside MP3 nop :/ (inside XBMC it's work but no JSON command). I think I will come back when I have more experience with Javascript... Thx for your help RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Bram77 - 2012-09-01 Is it just me, or is the 'limit' param not working on Audio- and VideoLibrary.GetRecentlyAdded* . Code: {"id":1,"jsonrpc":"2.0","method":"AudioLibrary.GetRecentlyAddedAlbums","params":{"limits":{"start":0,"end":4},"properties":["artist","thumbnail"]}} In all cases this request returns 25 results. Am I applying the limits the wrong way? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-09-01 @terrylau : 1) should work check the content of the playlist and / or xbmc debug log. 2) this is normal all the playlist namespace only works with current playlist. For your needs use the File.GetDirectory on the playlist and you will have the content @yallah: I think I remember a bug at a moment with images from mp3 tags and not folder images, check this thread and be sure to use last builds, if still present perhaps it's still not corrected so it may worth to open a trac ticket. @Bram77 : from code this seems normal the limits param is not used only recentsongs have an applied albumlimit. This may worth a change in behavior or a change in introspect. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - terrylau - 2012-09-03 (2012-09-01, 02:38)Tolriq Wrote: @terrylau : 1) should work check the content of the playlist and / or xbmc debug log. Thanks for your help - I'm almost there Just a bit more ... 1) How do you save the list of Now Playing songs as a playlist? 2) How do you delete a playlist from the list of playlists available? Been looking around but can't see any methods that are suitable for these operations. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-09-03 (2012-08-28, 10:02)Jasp Wrote:I will add an GUI.ActivateWindow() (or something similar) in the future.(2012-08-26, 07:48)Jasp Wrote: Just wondering if you will provide direct links like Input.Home to Videos, Movies, TV Shows, Music, Weather, Pictures and Programs. (2012-08-28, 17:08)Bram77 Wrote: @Millencolin007 Thanks again . Of course I'd already looked at the official documentation. I thought that maybe there was a workaround that doesn't show in the docs. I guess I'll have to get creative to distinguish between movies and tv shows.There should be an "id" and a "type": "tvshow" so you should be able to do a VideoLibrary.GetTVShowDetails call with the value of "id". (2012-08-28, 21:34)Tolriq Wrote: A small remark about introspect :Yup that description is wrong. Concerning -1 and 0. -1 does not mean "all" it means "parameter not set" which is the same as if you just don't provide an "end" property in your request. (2012-08-28, 23:10)seadog Wrote: 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?Currently not. Would be nice to integrate some of the filtering functionality I'm adding to FooLibrary.SetFooDetails but I haven't looked into that yet. (2012-08-29, 13:20)Tolriq Wrote: Another small remark"streamdetails" is not an array. It's an object which can have a "video", "audio" and "subtitle" property. (2012-08-29, 15:17)Tolriq Wrote: And an annoying bug with GetArtists, the total field is not correctly filed it's value is set to end.Thanks I thought I added that code to AudioLibrary.GetArtists but looks like I didn't. Will fix ASAP. (2012-08-31, 13:01)Tolriq Wrote: Is a Playlist.Move function in the plans ?Nah you didn't miss something. Playlist support is still awful (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.There's a PR that adds playlist notifications. Just didn't have time yet to look at it. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-09-03 (2012-08-31, 17:34)Mizaki Wrote: @yallah if you want JS examples https://github.com/frolick/AWX-Eden/blob/master/js/lib.xbmc.jsI'd love to differe between numbers and strings in the "advanced" filter but it's just not possible with the current system/implementation. (2012-09-01, 00:46)Bram77 Wrote: Is it just me, or is the 'limit' param not working on Audio- and VideoLibrary.GetRecentlyAdded* .Looks like I broke that recently. Will fix ASAP. (2012-09-03, 03:08)terrylau Wrote: Thanks for your help - I'm almost there Just a bit more ...You can't do either of those right now through JSON-RPC. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-09-03 (2012-09-01, 02:38)Tolriq Wrote: @terrylau : 1) should work check the content of the playlist and / or xbmc debug log. Now I understand I use last build (last night) from Xbmc Master. I change tag with thumbnail (real file), work perfectly. I ll wait for fix. Thx for your help RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-09-03 Quote:"streamdetails" is not an array. It's an object which can have a "video", "audio" and "subtitle" property. So maybe send back an object with empty arrays after :p the thing is that null object in direct json stream parsing is a pain to handle in normal cases BTW last Frodo builds have great JSON improvements and speed in limits in query is cool too |