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
|
- Malard - 2010-08-30 Nick8888 Wrote:I'm currently trying to make the xbmc web interface available from my domain through an apache server. I've been successful in doing this for other programs such as sabnzbd, sick-beard, tvheadend, transmission and couchpotato. In the new web interface all paths are absolute, however I will look to make this configurable long term. - Johnsel - 2010-08-30 The JSON server doesn't seem to parse sets into seperate movies when sending them to a client: Quote:29/08/10 18:29:03 - Response: { Now i'm not sure wether i should do something with this myself, or if it classifies as a bug/future request. Can someone please enlighten me on this one? - jmarshall - 2010-08-31 That looks as though it's returned a set. The set stuff happens at the same layer as the JSON API is fetching at, so the API doesn't know that it's received sets (and doesn't know what to do with them after that). Not sure what makes the most sense - options are having it so you can then request the set, or "flattening" the sets so that all that happens is the client gets a list of movies and can then choose to flatten the sets client side should they want to. Cheers, Jonathan - Johnsel - 2010-08-31 But is it possible to flatten the sets right now (client-side)? I wouldn't know how to request all the movies that are inside a set. - jonib - 2010-09-04 Hi, I'm working on my XBMCRepeat plugin for EventGhost. I started to add some more functionality using the HTTP API, but as that is going away I'm trying this newfangled JSON-RPC. I have gotten same stuff working, but now I'm stuck (hopefully its nothing embarrassing). So I'm trying to use VideoPlaylist.Add to add a video file to the playlist in XBMC (Dharma Beta1) The below command adds the "e:\test.avi" to the playlist and works, but there is no text, only an empty(blank) line when looking in the "Now playing" window. Code: {"params": {"file": "E:\\test.avi"}, "jsonrpc": "2.0", "method": "VideoPlaylist.Add", "id": 1} Code: { Code: {"params": {"file": "E:\\test.avi", "label": "Test"}, "jsonrpc": "2.0", "method": "VideoPlaylist.Add", "id": 1} So can someone tell me what I'm doing wrong? and/or point me to some more reading material about the parameter syntax. jonib List of all play lists - noem - 2010-09-05 Hello, I have a question regarding playlist support: How Can I get the list of all play lists i.e. for Audio ? Kind regards - Malard - 2010-09-05 jonib Wrote:Hi, I'm working on my XBMCRepeat plugin for EventGhost. Try using the webinterface branch, instead of adding things by path, add them by database id. Ideally all items should exist within the library. - jonib - 2010-09-05 Thanks for the reply. Malard Wrote:Try using the webinterface branch,Instead of Dharma Beta1? If so where to get binary? and I assume JSON-RPC support is better or why the webinterface branch? Quote:instead of adding things by path, add them by database id. Ideally all items should exist within the library.So I need to add the file to the library first? I don't see a command for that. And I can't assume the file is already in the library. jonib - SGulseth - 2010-09-06 Hello all, I'm kinda new to this forum but I have been using XBMC for a few weeks now. I have started on a dedicated XBMC Jsonrpc class for php, but I can't figure out why it does not work 100%. My problem is that 9 out of 10 times my connection times out and in the log it says just: "14:50:50 T:140333434550032 M:3258880000 NOTICE: WebServer: POST | /jsonrpc" When it works I get a reponse after < 1 second and when it fails it loads for ~10 seconds. Here is my code: PHP Code: class xbmcRPC { - Malard - 2010-09-06 SGulseth Wrote:Hello all, I'm kinda new to this forum but I have been using XBMC for a few weeks now. I have started on a dedicated XBMC Jsonrpc class for php, but I can't figure out why it does not work 100%. My problem is that 9 out of 10 times my connection times out and in the log it says just: In Dharma and trunk the WebServer is not multithreaded, as such each call is blocking, any long requests cause other requests to timeout. The webinterface branch has resolved this issue and will appear in trunk in due course. - Malard - 2010-09-06 jonib Wrote:Thanks for the reply. There is no pre-compiled binary for the webinterface branch, you will need to compile this manually for the time being. Raise a trac ticket for exactly what you are trying to do, I will either provide a sample fragment of code on how to do what your wanting correctly, implement the feature you require, or explain why what you are trying to do wont be supported. Thanks - jonib - 2010-09-06 Malard Wrote:There is no pre-compiled binary for the webinterface branch, you will need to compile this manually for the time being.I assumed as much, so it wont help me until there is. Quote:Raise a trac ticket for exactly what you are trying to do,Hmm, I'm not sure a trac ticket is appropriate place to declare my desire to learn how to use the JSON-RPC API in XBMC Quote:I will either provide a sample fragment of code on how to do what your wanting correctly, implement the feature you require, or explain why what you are trying to do wont be supported.I thought my post was clear of what I wanted, I guess not. I'm just trying to add a video file to the current playlist in XBMC via the VideoPlaylist.Add command, but the added entry doesn't get any label/title/text just an empty line. I don't want any new functionality, I just want to know why my code doesn't work, if it's a bug in the command or the feature is not implemented or that I'm using the wrong syntax. There are two videos in this list, the second added with VideoPlaylist.Add command from my other post, both work to play the video. There just is no label. jonib - Malard - 2010-09-06 jonib Wrote:I assumed as much, so it wont help me until there is. Thanks, probably me being a bit dumb in not translating your post; I will look into this probably sooner rather than later as I am writing the video management section of the web interface (basics of audio is now sorted) This is most likely a bug, infact an empty label in a playlist item is something we dont want in the GUI anyway, it should read '<no label>' at the very least so the user is aware something is there. Raise a trac ticket for that. - jonib - 2010-09-06 Malard Wrote:Raise a trac ticket for that.I have made a ticket here. Hopefully I added all relevant info. jonib Playing all songs from an album - ncarthy - 2010-09-12 Does anyone know how you play all the songs on an album in order of tracknumber? I can add the album to an AudioPlaylist and then play it with the commands below but it only sorts the songs in order of title A-Z. Code: {"id":1,"jsonrpc":"2.0","method":"AudioPlaylist.Add","params":{"albumid":96}} Adding Sort parameters to the Playlist.Add seems to have no effect. Do I just have to retrieve all the songs and then manually add them to the playlist in my desired order? I can retrieve an album's songs in tracknumber order with: Code: {"id":3,"jsonrpc":"2.0","method":"AudioLibrary.GetSongs", |