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
|
- Tolriq - 2012-02-27 For currently playing, you can ask for totaltime and time to get those informations. Videolibrary.Scan while already scanning - bradvido88 - 2012-02-27 I have a large video library and when I trigger an update on it, XBMC usually takes 3-5 minutes to finish scanning everything. I am seeing a problem when I call Videolibrary.Scan when XBMC is already scanning. In fact, calling it seems to stop the current scan, which is counter-intuitive. See debug log below. I first call it at 11:00:02. XBMC starts its scanning routine. Then I call it agan a second later at 11:00:03 and XBMC immediately stops its scanning and ends the update. I'd recommend either a query method like VideoLibrary.IsCurrentlyUpdating so we can query the status. Or at least the JSON-RPC interface should prevent Videolibrary.Scan when XBMC is already scanning, and not return "result":"OK" (like it currently does). Code: [b]11:00:02 T:8908 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.Scan", "params": {}, "id": "1"}[/b] EDIT - It also would be nice to be able to trigger a "Scan for content" on a specific directory instead of having to update my entire library and scan thousands of folders when I just need one scanned. Is there a trac ticket/feature request for this yet? - Montellese - 2012-02-27 This has already been reported before. This is how the builtin command works that XBMC provides in all it's APIs like the skinning engine etc. A "isscanning" property might be considered though. Not sure if there already is a ticket for it. - bradvido88 - 2012-02-27 Montellese Wrote:This has already been reported before. This is how the builtin command works that XBMC provides in all it's APIs like the skinning engine etc. A "isscanning" property might be considered though. Not sure if there already is a ticket for it. OK, I understand this is a core XBMC issue instead of a JSON-RPC issue. Maybe a smaller request would be to support specifying a specific directory to be scanned instead of the whole video library. I know the XBMC built in command has the option to specify a directory Code: UpdateLibrary(database,[path]) It would sure speed up scans for users with large libraries... - Montellese - 2012-02-27 See https://github.com/Montellese/xbmc/commit/7f3f7359a1ad7a66779bf460ec9679f42ce79141 i.e. I have already implemented this a few weeks ago and it's waiting for Eden to be released and then I'll merge it into master. - yallah - 2012-02-28 hi, Is it possible via Json to put video in full screen or window inside template (like "tab" button)?? - Montellese - 2012-02-28 Currently not but I have already done the necessary coding for a GUI.SetFullscreen() method which will be available after Eden has been released. - yallah - 2012-02-28 Montellese Wrote:Currently not but I have already done the necessary coding for a GUI.SetFullscreen() method which will be available after Eden has been released. thxfor quick reply Determining if library is being scanned - tack - 2012-02-28 In Dharma, I was able to detect if XBMC was scanning the library by using the System.GetInfoBooleans method with params ["library.isscanning"]. I see that in Eden the method is now XBMC.GetInfoBooleans, but it's not accepting library.isscanning. It comes back with an "invalid type string received" error: Code: {"params": ["library.isscanning"], "jsonrpc": "2.0", "method": "XBMC.GetInfoBooleans", "id": 1} It's not clear to me what the proper parameters should be now. Can someone point me in the right direction? Or perhaps with Eden there is a better way to determine if it's currently scanning the library? Thanks! - Montellese - 2012-02-28 Please take a look at the documentation in the wiki or at the output of JSONRPC.Introspect. It's very clearly written that the "params" object/array needs to contain an array of strings (named "booleans" in case you use parameters-by-name): http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v4#XBMC.GetInfoBooleans So you're request needs to be Code: {"params": { "booleans": ["library.isscanning"] }, "jsonrpc": "2.0", "method": "XBMC.GetInfoBooleans", "id": 1} - tack - 2012-02-28 Montellese Wrote:It's very clearly written that the "params" object/array needs to contain an array of strings (named "booleans" in case you use parameters-by-name):Thanks Montellese. I should have expanded the JSON schema description where this is very clear. I didn't pay proper attention to the description of the interface changes. In any case, the "JSON RPC: Important changes" thread says that XBMC.GetInfoBooleans is considered deprecated. Is there a non-deprecated way at this time to determine if the library is currently being scanned? Thanks again. - Montellese - 2012-02-28 No there isn't. - tack - 2012-02-28 All right. While I have you, in case it's not already on your to-do list, I thought I'd mention that there are two things that keep me using the deprecated HTTP API which (from what I can tell) the JSON-RPC doesn't support yet: 1. XBMC.Notification via ExecBuiltIn 2. XBMC.updatelibrary via ExecBuiltIn -- I understand there is VideoLibrary.Scan, but I need the ability to specify a sub-path, whereas VideoLibrary.Scan does a full library scan. Not urgent while the HTTP API exists, but I'd certainly not want the HTTP API to vanish before the JSON API exposes at least this functionality. - Montellese - 2012-02-28 I have already implemented both methods/changes, they are just waiting for Eden to get out of the door - yallah - 2012-02-29 Hi, Little bug for Json PVR. Can't use it when some OSD is present. Working very well when i'm in full screen (not when i m in PVR screen ,EPG, or when tv video is in miniature when you are in home page...) Thx |