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 - Tolriq - 2014-02-03 Thanks for the fix Since we are in details can you look into this too before final ? (2013-12-05, 20:31)Tolriq Wrote: Seems like an old bug have come back RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2014-02-07 Some Files.GetDirectory weirdness It seems the directory param is somehow case sensitive but not totally. Let's say you have a source configured as C:\xx Code: {"jsonrpc":"2.0","id":1,"method":"Files.GetDirectory","params":{"directory":"C:\\xx\\","media":"video","properties":["resume"]}} Will return the correct resume value for the media but Code: {"jsonrpc":"2.0","id":1,"method":"Files.GetDirectory","params":{"directory":"c:\\xx\\","media":"video","properties":["resume"]}} Will return 0 as resume and empty other fields. (And in the listing all media have a c:\xx\... path) This should either work in both case, or gives an error when using the wrong case but right now it's quite disturbing and may make some devs loosing hairs and time And another detail (or not) : Code: {"jsonrpc":"2.0","id":1,"method":"Files.GetDirectory","params":{"directory":"c:\\xx\\","properties":["resume"]}} Same query without specifying a media type will not return the resume property at all while it should return an empty / 0 one. Since we should be able to assume that when we request a field and the query is successful the answer should have all the requested fields. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-02-07 (2014-02-07, 12:10)Tolriq Wrote: Some Files.GetDirectory weirdness I'll have to look into the virtual filesystem code of XBMC as JSON-RPC simply passes the directory on to that. Maybe there is some path comparison in the JSON-RPC code though. My guess is that there is a path/file based database query which is always case sensitive and will therefore most likely fail and then you don't get any details from the database. Concerning the missing "resume" property: What happens if you e.g. specify media as "videos" and ask fro the "mood" property (which only exists for albums/songs)? The problem right now is probably that when not specifying any media type (which defaults to "files") it completely bypasses the logic to handle requested properties except for a select few which make sense for files. That way the request can be handled faster. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2014-02-07 Well the problem is that you request a property get an OK answer but do not get the property it should be sent back as null or empty but should be present. (This is typically the case when requesting resume for getdirectory on a bad case folder, we do get an resume back with 0 / 0 but at least the field is here even if internally Xbmc has not queried the database to get the value) Anyway requesting videos and mood + album + albumartist will return album:"" but no mood or albumartist field. Not very consistent either Edit : And yes media = files should continue to not query database This is mandatory to browse big directory on things like rPi Just a matter of field returned empty instead of no fields RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-02-07 Yes you get "album" because it is a property for musicvideos but "mood" or "albumartist" isn't so it isn't handled in the video logic and that's why you don't get it in the response. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - rtenklooster - 2014-02-09 Any plans on implementing pvr recordings? I read a post a couple of months ago, it was a post frode thing.. but I haven't read any of it since. I would love to show recordings in my jquery mobile webapp on my phone, and select a recording for playback. Currently i'm using argustv rest api to create a list of the recordings, i can playback a recording to, but my webapp needs to take care of setting a recording to watched etc. Talking to xbmc json and argus tv api is a workaround but not ideal. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2014-02-10 New little thing Pin code protected dialog locks EventServer and Http server when displayed. While if I remember there's some dialog that locks Http server this is the first time I see EventServer locked you can not even send a back to dismiss it And needs to have a keyboard. Furthermore the keyboard arrows are disabled so even if you show the number pad you can only click the numbers and not move with they keys as in all other dialogs. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2014-02-12 I'm trying to get the last 10 movies from a smart playlist by using limits and sort properties but I get an error : Code: 17:27:59 T:7100 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "id": 1, "method": "VideoLibrary.GetMovies", "params": {"directory": "special://profile/playlists/video/Action.xsp", "media": "video", "properties": ["title"], "limits": {"end": 10}, "sort": {"order": "descending", "method": "dateadded"}}} Does XSP files are not supported with sort parameter ? Running XBMC 12.3 on Windows 7. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-02-12 Uhm you're using the wrong method. It needs to be Files.GetDirectory and not VideoLibrary.GetMovies when using an XSP. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2014-02-13 Sorry, wrong Copy / Paste from skin widget python code :S But error still occur : Code: 10:07:36 T:4308 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "id": 1, "method": "Files.GetDirectory", "params": {"directory": "special://profile/playlists/video/Action.xsp", "media": "video", "properties": ["title"], "limits": {"end": 10}, "sort": {"order": "descending", "method": "dateadded"}}} And Files.GetDirectory does not support limits parameter ? http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#Files.GetDirectory RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - jez500 - 2014-02-13 Hi guys, I have been working on a web interface for a while now ( here if your interested: http://forum.xbmc.org/showthread.php?tid=183451 ) and have been able to get pretty damn far with the jsonrpc (browser audio streaming, local playlists, soundcloud integration). It is awesome During this time I have become very fluent with the api, but there are a few things that either don't exist, I'm doing it wrong or looking in the wrong place. So I thought I'd ask.. 1. Closing osd dialogs - now and again I may trigger something with the api that causes a dialog to open on screen, most common is "Failed playback" due to a library entry with a path to a invalid file, but also input dialogs (eg. search). When these are open, I seems to prevent any other api calls getting through and I need to go over to the host running xbmc and physically click the close button. So my question basically is, does anyone know of ways to avoid this? eg. allow the api to still do calls while a dialog is open, with search boxes I can send text with Input.SendText and it closes them but, error dialogs seem to kill at least, most commands. 2. Callback on input osd dialogs opening - I have only really tested this with the soundcloud addon so the issue may lay there, however just in case... When I navigate to a path using Files.GetDirectory, if that causes an input dialog to open on screen, the api returns success prior to the dialog opening, meaning I cannot reliably chain events eg. Files.GetDirectory > Input.SendText (leaving me back at issue 1) 3. Persistent storage - I am pretty sure this is a feature request however I might have just missed it too. I would love a way to save/retrieve some data on the host via the api. something like storage System.setVariable {key: value} and System.getVariable {key}. I have heaps of cool ideas if such a thing existed (eg. web ui settings, who played that song and many more ). Any suggestions? 4. "file" property missing when calling AudioLibrary.GetSongDetails in frodo (12.3 stable) - Pretty sure this is a bug and have seen it briefly mentioned in other threads, It works in gotham and also retrieving a songs via AudioLibrary.GetSongs but not when grabbing just one song with AudioLibrary.GetSongDetails, I have found dirty workarounds but it comes at a performance hit. Any plans on fixing this or should I just wait for gotham stable? Thanks in advance! RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2014-02-13 Hi, Is there a way to get the lastplayed Season of a TvShow ? I saw that i can get the lastplayed for Tv Shows and Episodes, but not for Seasons. Any tip ? Thanks in advance. Clayton RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - ace5342 - 2014-02-14 for some reason I can't delete this post? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-02-16 (2014-02-13, 11:05)mikebzh44 Wrote: Sorry, wrong Copy / Paste from skin widget python code :SWhat version of XBMC are you using? The "limits" parameter for Files.GetDirectory is only available in recent gotham nightly builds but not in Frodo. (2014-02-13, 14:58)jez500 Wrote: 1. Closing osd dialogs - now and again I may trigger something with the api that causes a dialog to open on screen, most common is "Failed playback" due to a library entry with a path to a invalid file, but also input dialogs (eg. search). When these are open, I seems to prevent any other api calls getting through and I need to go over to the host running xbmc and physically click the close button. So my question basically is, does anyone know of ways to avoid this? eg. allow the api to still do calls while a dialog is open, with search boxes I can send text with Input.SendText and it closes them but, error dialogs seem to kill at least, most commands.That's a known issue. Ideally most JSON-RPC actions would not trigger any GUI dialogs at all. Furthermore JSON-RPC should still be usable while dialogs are open but at least all Player methods don't work anymore. Have you tried using Input.ExecuteAction with the "back" action? (2014-02-13, 14:58)jez500 Wrote: 2. Callback on input osd dialogs opening - I have only really tested this with the soundcloud addon so the issue may lay there, however just in case... When I navigate to a path using Files.GetDirectory, if that causes an input dialog to open on screen, the api returns success prior to the dialog opening, meaning I cannot reliably chain events eg. Files.GetDirectory > Input.SendText (leaving me back at issue 1)Yes this is a problem on how XBMC works internally. It's great for GUI stuff but not for JSON-RPC but all code was written for GUI stuff so JSON-RPC currently runs into these problems. (2014-02-13, 14:58)jez500 Wrote: 3. Persistent storage - I am pretty sure this is a feature request however I might have just missed it too. I would love a way to save/retrieve some data on the host via the api. something like storage System.setVariable {key: value} and System.getVariable {key}. I have heaps of cool ideas if such a thing existed (eg. web ui settings, who played that song and many more ). Any suggestions?I don't understand what exactly you are after. (2014-02-13, 14:58)jez500 Wrote: 4. "file" property missing when calling AudioLibrary.GetSongDetails in frodo (12.3 stable) - Pretty sure this is a bug and have seen it briefly mentioned in other threads, It works in gotham and also retrieving a songs via AudioLibrary.GetSongs but not when grabbing just one song with AudioLibrary.GetSongDetails, I have found dirty workarounds but it comes at a performance hit. Any plans on fixing this or should I just wait for gotham stable?There will be no more fixes for Frodo. You'll have to wait for the next stable release (i.e. Gotham). (2014-02-13, 22:39)claymic Wrote: Hi,You'll have to get the lastplayed episode of a tvshow and then determine the season from there (which is just a property of the episode). RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2014-02-16 (2014-02-16, 17:13)Montellese Wrote:(2014-02-13, 11:05)mikebzh44 Wrote: Sorry, wrong Copy / Paste from skin widget python code :SWhat version of XBMC are you using? The "limits" parameter for Files.GetDirectory is only available in recent gotham nightly builds but not in Frodo. I was using Frodo 12.3. I will test Gotham as soon as possible. Thanks. |