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
|
- null_pointer - 2011-12-27 Quote:That's not possible right now but it's a good idea. Can you create a feature request ticket for it and CC me? We could either return an additional property "excluded" for every source or we could add a parameter with which you can specify wether to provide the excluded sources as well. Thanks, done. http://trac.xbmc.org/ticket/12354 - bradvido88 - 2011-12-27 Is there any notification/announcement or other way to tell when a VideoLibrary.Scan has finished. That is, when XBMC has finished scanning and updating the Video Library? Thanks, bradvido - Montellese - 2011-12-27 bradvido88 Wrote:Is there any notification/announcement or other way to tell when a VideoLibrary.Scan has finished. That is, when XBMC has finished scanning and updating the Video Library? Nope there isn't right now. But you can open a feature request ticket for it. - vasikgreif - 2011-12-29 Montellese Wrote:Okay but that's still with a remote directory and not a local one. Sorry for not coming back sooner. As I use live XBMC distro upgraded to preEden, so I don't have any video files locally. I'm not good at linux, can you tell me how can I copy some files to the hdd to be able to check this? Thanks Vasik - Jason102 - 2011-12-29 Is there any way to force the retrieval of video metadata if XBMC hasn't gotten it already? I really need to figure out the duration of video files that are in the user's library but no metadata is there yet. - Tolriq - 2011-12-29 For what i know xbmc will add the metadata when you do a library scan. But if the NFO does contain data this data will be used even is the data is empty. The solution i choose is Ember with automated scan of only metadata and disable all data plugins. So it's only update the nfo with up2date metadata. Not perfect but quick and easy solution - Montellese - 2011-12-30 vasikgreif Wrote:Sorry for not coming back sooner. As I use live XBMC distro upgraded to preEden, so I don't have any video files locally. I'm not good at linux, can you tell me how can I copy some files to the hdd to be able to check this? Thanks I don't use linux either so I can't really help you there sorry. Jason102 Wrote:Is there any way to force the retrieval of video metadata if XBMC hasn't gotten it already? I really need to figure out the duration of video files that are in the user's library but no metadata is there yet. No JSON-RPC does not provide a Refresh method or something like that. Not even sure if the Refresh functionality in XBMC retrieves the metadata. - null_pointer - 2012-01-01 There might be a problem with empty directories and the response form GetDirectory http://forum.xbmc.org/showpost.php?p=973729&postcount=5 the response fails eval() - Montellese - 2012-01-01 null_pointer Wrote:There might be a problem with empty directories and the response form GetDirectory Well that's because in python there is no "null" as they call it "None" but "null" is a valid type/value in JSON (see http://www.json.org/). There are also other calls which might return "null" as a value for a certain property. You should use a json(-rpc) library to handle the responses in python even though python uses a very similar (but not identical) object representation as JSON does. In that particular case though it would also make sense to return an empty array (i.e. "[]") instead of null which might make overall parsing simpler. - null_pointer - 2012-01-01 Quote:You should use a json(-rpc) library to handle the responses in pythonExcellent, thanks. SetSpeed only works with positive values - wuench - 2012-01-02 I am trying to use Player.SetSpeed. When passing a zero or negative value I am getting back the error, positive values work. If I don't quote the values I get: {"jsonrpc":"2.0","method":"Player.SetSpeed","params":{"playerid":1,"speed":-1},"id":0} {"error":{"code":-32602,"data":{"method":"Player.SetSpeed","stack":{"message":"Received value does not match any of the union type definitions","name":"speed","type":["string","integer"]}},"message":"Invalid params."},"id":0,"jsonrpc":"2.0"} If I quote the values I get: {"jsonrpc":"2.0","method":"Player.SetSpeed","params":{"playerid":1,"speed":"-4"},"id":0} {"error":{"code":-32602,"data":{"method":"Player.SetSpeed","stack":{"message":"Received value does not match any of the defined enum values","name":"speed","type":["string","integer"]}},"message":"Invalid params."},"id":0,"jsonrpc":"2.0"} Running Eden Beta 1. Am I constructing the command correctly? - Montellese - 2012-01-02 wuench Wrote:I am trying to use Player.SetSpeed. When passing a zero or negative value I am getting back the error, positive values work. No it was broken in XBMC because I introduced union types. I fixed it in https://github.com/xbmc/xbmc/commit/fabc0538ef3554b8c923c9fb52aad3f11af6253c Thanks for reporting it. - wuench - 2012-01-02 Thanks. FYI, I also posted a bug about the navigation commands not playing the action sounds that got fixed 2 hours after posting. Awesome! - Montellese - 2012-01-02 Yeah I saw that one as well but vdrfan was faster than me - yallah - 2012-01-07 Hi, No possibility to put methods : "LiveTV.GetChannelGroupDetails" "LiveTV.GetChannels" "LiveTV.GetChannelDetails" "LiveTV.GetEpgDetails" like you did : https://github.com/Montellese/xbmc/tree/pvr Regards |