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 - Lunatixz - 2014-03-18 (2014-03-18, 22:12)Tolriq Wrote: Just be sure that your file is in a source and not a random location as access is denied if it's not the case I figured out why it wasn't opening (I accidentally used 'path' instead of 'file', duh), but now i'm back to square one. File opens but doesn't seek or resume to given vaule. Even using your example: Code: {"jsonrpc":"2.0","id":1,"method":"Player.Open","params":{"item":{"file":"smb://.....mkv"},"options":{"resume":{"hours":0,"minutes":8,"seconds":8,"milliseconds":0}}}} File opens, but always starts at the beginning... This is the same behavior I observed while testing in Frodo. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lunatixz - 2014-03-22 Can someone knowledgeable in Json try: Code: {"jsonrpc":"2.0","id":1,"method":"Player.Open","params":{"item":{"file":"smb://.....mkv"},"options":{"resume":{"hours":0,"minutes":8,"seconds":8,"milliseconds":0}}}} I know it returns "ok" but does it actually seek to the set resume point? From my experience it simply plays the file without seeking... Thanks ::Update:: Nevermind, I figured it out. It was a problem of how the commands were stacked together and nested... RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2014-03-24 Does lastplayed value is not available for GetDirectory function ? Code: 11:59:28 T:2924 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "special://profile/playlists/video/Cartoons.xsp", "media": "video", "properties": ["title", "originaltitle", "playcount", "year", "genre", "studio", "country", "tagline", "plot", "runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", "art", "streamdetails", "mpaa", "director", "dateadded", "lastplayed"]}, "id": 1} Because this value is listed in List.Field.Files, according to the wiki : http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#Files.GetDirectory http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#List.Fields.Files Thanks. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-03-24 (2014-03-24, 13:09)mikebzh44 Wrote: Does lastplayed value is not available for GetDirectory function ? Please read the output provided by XBMC. It tells you that the elements at index 12 and 21 in the array you provide are not unique. In your case both are "lastplayed" but the JSON-RPC API does not allow two elements with the same value. Remove one of them and you should be good. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2014-03-24 Oops, sorry :S RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2014-03-26 artistid and albumartistid are not retrieve with GetDirectory method and Songs or Albums smart playlists. Playlist: Code: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> Code: _json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "music", "properties": ["artistid", "albumid", "albumartistid", "dateadded"]}, "id": 1}' %(PLAYLIST)) Result : Code: ('_files=', [{u'filetype': u'file', u'label': u'Do I Wanna Know?', u'albumid': 2, u'file': u'G:\\Musiques\\Arctic Monkeys\\2013 - AM\\01 - Arctic Monkeys - Do I Wanna Know-.mp3', u'type': u'song', u'id': 2360}, {u'filetype': u'file', u'label': u'Rolling into deep', u'albumid': 1, u'file': u'G:\\Musiques\\Adele\\2011 - 21\\01 Rolling in the Deep.mp3', u'type': u'song', u'id': 2347}]) RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - wuench - 2014-03-30 What property values will trigger a Player.OnPropertyChanged notification? The JSONRPC documentation lists a lot of properties like time, percentage, etc. But I don't see any OnPropertyChanged notifications coming in at all so I assume it can't return those values.... RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-03-30 (2014-03-30, 21:09)wuench Wrote: What property values will trigger a Player.OnPropertyChanged notification? The JSONRPC documentation lists a lot of properties like time, percentage, etc. But I don't see any OnPropertyChanged notifications coming in at all so I assume it can't return those values.... Right now only "shuffled" and "repeat" AFAICT. The others are properties you can retrieve through Player.GetProperties. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - wuench - 2014-03-30 Ok, thanks. That's what I figured. I know I can retrieve that info through polling, and currently do. But my driver is pushing the CPU on my Raspberry Pi by about 10-15% polling every 3 seconds so I am trying to be a little more efficient on how I poll. OnPropertyChanged looked like it solved all my problems, but it looks like I will need to get more creative and fake the time tracking. I get why you wouldn't want to push that info out in events... RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lunatixz - 2014-04-06 ::edit:: RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2014-04-11 Hi guys, This is already working, right ? Quote:November 11th 2013:Can you guys tell me if is working for Frodo too ? Is there a place where i can read about it ? Thanks Clayton RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-04-11 It's not available in Frodo and there's no real documentation about it except of the API definition. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2014-04-11 Thanks Montellese I the code bellow to get a description of the Settings.GetSettings Quote:{"jsonrpc":"2.0","method":"JSONRPC.Introspect","params": {"getdescriptions": true,"filter":{"getreferences":true,"id":"Settings.GetSettings","type":"method"}},"id":1}But now i am trying to get all values that i can use on the "section" and "category" fields, can i do that using JSONRPC.Introspect ? For get the audio output value, the user joethefox already help me Quote:{"jsonrpc":"2.0","method":"Settings.GetSettings", "params":{"filter":{"section":"system","category":"audiooutput"}},"id":1}Thanks again Clayton RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-04-11 You need to use Settings.GetSections to get a list of possible values for "section" and Settings.GetCategories to get a list of possible values for "category". Or you can look into XBMC's settings definition in your XBMC installation under system/settings/settings.xml to see what exists and what doesn't. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2014-04-14 Thanks Montellese, sorry, i was so tired when i wrote this question that i don´t read everything on the commit, now i know how it works, very cool. Can you tell me if is already possible to request a image with a specific size ? I tried to found any information about this but i don´t found. Thanks again Best regards Clayton |