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 - wellspokenman - 2016-10-15 Is 'keep audio device alive' accessible with JSON? I can't see it in the output of GetSettings. In case there's another approach: I'm asking because I need Kodi to let go of the audio device when launching an emulator (ubuntu/retroarch). RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Milhouse - 2016-10-16 (2016-10-15, 23:07)wellspokenman Wrote: Is 'keep audio device alive' accessible with JSON? I can't see it in the output of GetSettings. In case there's another approach: I'm asking because I need Kodi to let go of the audio device when launching an emulator (ubuntu/retroarch). audiooutput.streamsilence RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - wellspokenman - 2016-10-16 That's it! Thanks Milhouse. Here's the full blob in case others in search of streamsilence docs find this post: Code: { RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - poisdeux - 2016-11-23 The JSON-RPC API specifies Application.OnVolumeChanged should return an integer. http://kodi.wiki/view/JSON-RPC_API/v6#Application.OnVolumeChanged However, Kodi returns a float. https://github.com/xbmc/xbmc/blob/master/xbmc/Application.cpp#L4783 Which one is correct? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - axa88 - 2016-12-19 (2016-11-23, 16:45)poisdeux Wrote: The JSON-RPC API specifies Application.OnVolumeChanged should return an integer. i recall it being a float regardless of what the doc says RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Jeremy White - 2017-01-01 Playing any smart playlist on kodi seems to play the items in random order. This appear to be a long standing bug, but it makes using Kodi headless form a remote like Yatse impossible as the tracks are always shuffled. Is this a tracked bug and is there any chance of progress being made on it? This seems like an obvious deficiency (and the Yatse developer is pointing at the kodi developers.) 2017-01-01 17:47:30.658 Verbose/JsonRpc: d.a@209: Request : [{"jsonrpc":"2.0","id":210,"method":"Playlist.Clear","params":{"playlistid":0}},{"jsonrpc":"2.0","id":159,"method":"Playlist.Add","params":{"playlistid":0,"item":{"directory":"plugin://plugin.audio.spotify/?action=browse_album&albumid=1kCHru7uhxBUdzkm4gzRQc","recursive":true}}},{"jsonrpc":"2.0","id":205,"method":"Player.Open","params":{"item":{"playlistid":0,"position":0}}}] Seems to always start on the 9th track. No obvious reason why this would be the case. I can link to many other reports on the same issue on various forums if that would be helpful, but I can reproduce this with debug logs if you want. Here is a link to people discussing the issue : https://yatse.tv/redmine/boards/1/topics/17 https://www.reddit.com/r/xbmc/comments/1a6ae9/jsonrpc_to_play_music_in_random_order/ http://forum.kodi.tv/showthread.php?tid=162425 RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2017-01-03 Hi There is any filter that i can use with "PVR.GetBroadcasts" ? I am trying to find a way to only request channel´s programs that i don´t have in my app yet, for now i have to get all channel´s programs every time that i need to update the EPG. Regards RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - axa88 - 2017-01-05 (2017-01-01, 07:24)Jeremy White Wrote: Playing any smart playlist on kodi seems to play the items in random order. just a question more than an answer, is what your showing here even a smart playlist? it seems to be a batch of commands, one of which is to add to the playlist a directory prescribed from an addon, i don't see any .xps files that indicate to me xml descriptive smart playlists... And fwiw, a batch by json 2.0 definition doesn't have to process them in any particular order so, id be weary that as well. im not sure how exactly kodi handles batches but when i code i suppose it follows the spec which states order is not guaranteed. And fwiw haven't yet noticed playlists not doing what i tell it to. not sure about smart ones though "The Server MAY process a batch rpc call as a set of concurrent tasks, processing them in any order and with any width of parallelism." RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Jeremy White - 2017-01-06 If I understand this correctly this isn't a batch. I"m playing plugin://plugin.audio.spotify/?action=browse_album&albumid=1kCHru7uhxBUdzkm4gzRQc which is a playlist that contains the files in the spotify playlist. You can see another bug filed here : https://yatse.tv/redmine/boards/1/topics/17?r=18#message-18 "Yes this is a known Kodi bug with smart play list." This is either a kodi bug or a yatse bug. Until someone admits it is their bug, it wont be fixed and I can't use my kodi as a headless appliance like I dreamed of doing. Can you use yatse and try this and see what I am experiencing? Both yatse and kodi will dump the actual json being used. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2017-01-06 http://forum.kodi.tv/showthread.php?tid=68263&pid=1975308#pid1975308 http://forum.kodi.tv/showthread.php?tid=68263&pid=2247341#pid2247341 No time to search for more, this is a Kodi issue and it's well known and reported RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - ncarthy - 2017-01-06 @jeremy, Have you tried using the options of the Player.Open command? I cant remember the exact format but something like "options":{"shuffled":false} RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Jeremy White - 2017-01-06 (2017-01-06, 19:46)ncarthy Wrote: @jeremy, Have you tried using the options of the Player.Open command? I don't have access to the yatse code. They just keep insisting it it a kodi bug. Is there any good tool to simulate json requests to kodi I can test with? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2017-01-07 (2017-01-06, 21:55)Jeremy White Wrote:(2017-01-06, 19:46)ncarthy Wrote: @jeremy, Have you tried using the options of the Player.Open command? I do, and I know every single line of it And I do know and practice Kodi code since a lot of years with numerous patches merged, tons of bug report. So you may choose to not believe but it's quite easy to test by yourself. Create an XSP file, use player.open since 16.x it will most of the time work and respect or not the random parameter but as reported in one of my link 3 post earlier, it will fail for some xsp types like episodes. (And on previous Kodi version result where very inconsistent). The workaround is to use Kodi playlist and add the playlist via Playlist.Add then start the first item of the playlist. Adding playlist as files sometimes works but have the great side effect to not expand the playlist inside Kodi playlist system accessible via JSON, so files are queued but you can't see the queue or interact with it. The problem is that Playlist.Add have a known bug about not respecting order given in the xsp or m3u but fully consider that it's a folder and add the file in alphabetical order. Ignoring XSP order parameter or m3u real order. Dealing with Kodi JSON is all about compromise and hacks, specially for some parts like playlists. And for playlist there's no good way to cover everything correctly, the best possible way is the workaround Yatse use that at least plays things 100% of the time and allows proper control. At the expense of xsp random bug and m3u reordering. (But Yatse also offer playlist listing in correct order + a play all button that plays in order to address this limitation). RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - ncarthy - 2017-01-07 Tolriq is 100% right of course. Just to check I tested using the "option" parameter of Player.Open myself and it didn't work so forget that idea. The problem does not occur at the Player.Open stage, it occurs at the Playlist.Add stage. Basically by calling that particular Playlist.Add command you are adding the songs in some default format, probably how the album is in Spotify's database. For that particular album, it always starts with the 9th song. A different album will have a different start. I don't think it's random, its just how the album was stored on some database somewhere, probably Spotify.com. If you look at the code in the Spotify addon the developer gets the track list and then sorts it in the addon, then adds them one-by-one to a playlist. He also takes the time to retrieve the metadata about each song, stuff that would be lost if you just use the Playlist.OnAdd with a directory like you did. (its a pretty neat addon) RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - joethefox - 2017-01-07 Don't get me wrong, but iOS remote app users never had this issue and the json commands aren't "special" ! Code: {"jsonrpc":"2.0","method":"Playlist.Clear","id":460897777,"params":{"playlistid":0}} and it starts from the beginning. (and the options parameters in Player.Open is working as expected ALWAYS) If you want shuffled items: Code: {"jsonrpc":"2.0","method":"Playlist.Clear","id":460897777,"params":{"playlistid":0}} If you want the party mode just use: Code: {"jsonrpc":"2.0","method":"Player.Open","id":-14808852,"params":{"item":{"partymode":"special://profile/playlists/music/Long Tracks.xsp"}}} So, can someone explain me when the issues occur |