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-09-03 Monday, September 3rd 2012: Commits: f41b3c5728581ce32c99, 0548adfccfc548e43c97
RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-09-03 (2012-08-30, 23:49)Mizaki Wrote: Can anyone point out where I've gone wrong with: Ignore this, it works. I was so busy looking at the nested structure I didn't notice I had "filter": { twice Great work on the "advanced" filtering Even if I still can't find an easy way to generate the right structure. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Millencolin007 - 2012-09-04 I was testing Music Pump on a raspberry pi and have discovered that some queries are very very slow. As example Code: time curl -H "Content-Type: application/json" -d "{\"jsonrpc\": \"2.0\", \"method\": \"AudioLibrary.GetSongs\", \"params\" : {\"properties\" : [\"title\", \"artist\", \"genre\", \"album\", \"track\", \"thumbnail\", \"file\", \"duration\", \"rating\", \"albumid\", \"artistid\", \"albumartist\"] }, \"id\" : 1 }" http://192.168.1.35:8080/jsonrpc | python -mjson.tool takes 24 minutes!! to return the json result (~10'000 songs). If I don't fetch the thumbnail property the same query "only" takes about 1 minute to execute which is more than 20 times faster. Code: time curl -H "Content-Type: application/json" -d "{\"jsonrpc\": \"2.0\", \"method\": \"AudioLibrary.GetSongs\", \"params\" : {\"properties\" : [\"title\", \"artist\", \"genre\", \"album\", \"track\", \"file\", \"duration\", \"rating\", \"albumid\", \"artistid\", \"albumartist\"] }, \"id\" : 1 }" http://192.168.1.35:8080/jsonrpc | python -mjson.tool Any idea what the problem could be? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-09-04 On rpi anything that interacts with the filesystem (db queries if you use sqlite, thumbnail caching etc) takes very long for a single filesystem access/read and if xbmc has to do that ~10'000 times it takes forever RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Millencolin007 - 2012-09-04 Does xbmc check if the thumbnails exist before returning the json response? I was thinking that the thumbnail paths are stored in the db. This would explain the huge difference between the two queries. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-09-04 Query database does file system access to get the thumbs ? In the case of rpi, passing from 1mn to 20mn just to get another field from db does not seems normal. I've seen the same problem on my install during tests, if during migration from eden to frodo alpha I refuse to rescan the thumbs then all requests are way more slow. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - doozer - 2012-09-06 Eden 11.0 Is there a way via JSON-RPC to bring up the context menu (ie. right click on an item)? I couldn't find anything obvious, so I tried to use the old deprecated Web API as a last resort: Code: http://xbmc:8080/xbmcCmds/xbmcHttp?command=Action(117) This brings up the context menu, but seems to hang XBMC until you close the context menu, which means i can't send it any navigation commands Thanks, Matt. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-09-06 (2012-09-06, 12:55)doozer Wrote: Eden 11.0 Unfortunately not. In the current nightly builds you can use Input.ContextMenu (or Input.ExecuteAction with the action being "contextmenu"). RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Jasp - 2012-09-06 (2012-09-06, 12:55)doozer Wrote: Eden 11.0 I found the only way to do it in Eden without locking up was: Code: http://xbmc:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=Action(ContextMenu) But as said above, the nightlies allow for Context Menu to be accessed directly via the Input command. Jasp RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - terrylau - 2012-09-07 Is there a way via JSON-RPC to directly play the whole music album? So far my workaround is to get all the items in the album and insert it into the playlist one by one. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - terrylau - 2012-09-07 (2012-09-07, 05:14)terrylau Wrote: Is there a way via JSON-RPC to directly play the whole music album? So far my workaround is to get all the items in the album and insert it into the playlist one by one. It's ok, I've already found the answer by - using Playlist.Add by albumid and start playing the first item on the playlist. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-09-07 Well the normal way would be to use the Player.Open with the albumid value of the item parameter set to the correct albumid RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - terrylau - 2012-09-07 You are right It works now, previously tried it out but was not working and tried to do it using another way. However still having problem with using the Player.Open with the item parameter set to file : Code: {"jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "file": "special://profile/playlists/music/All Angels Playlist.m3u" } }, "id": 1} Looking into the xbmc.log it gives the log : ERROR: Texture manager unable to load file: special://profile/playlists/music/All Angels Playlist.m3u. Tried with two different XBMC machines and both giving the same log and result. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-09-07 AFAIK you can't pass a path to a playlist to the "file" parameter of Player.Open. That's only meant to be used for playable items like mp3's, avi's, mkv's etc. Re: RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Bram77 - 2012-09-07 (2012-09-07, 05:14)terrylau Wrote: Is there a way via JSON-RPC to directly play the whole music album? So far my workaround is to get all the items in the album and insert it into the playlist one by one. You can add all directory content (non recursive) to the playlist in one call. |