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
|
- Montellese - 2012-01-07 yallah Wrote:Hi, Uhm I'm not sure if you are asking me something or if you just stated a fact. The work I did in my PVR branch is not available anywhere except in there and it's heavily outdated as I don't have the time to continue working on it so these can't be used. - yallah - 2012-01-07 Montellese Wrote:Uhm I'm not sure if you are asking me something or if you just stated a fact. The work I did in my PVR branch is not available anywhere except in there and it's heavily outdated as I don't have the time to continue working on it so these can't be used. Oh sorry it's question. I ll try to parse tv channel thru databases sqlite tv and epg. Regards - giftie - 2012-01-07 null_pointer Wrote:There might be a problem with empty directories and the response form GetDirectory You can use a json library as Montellese describes, or to use eval() the json responce by declaring values before the eval() I use this method instead of a json lib. See my post here -> http://forum.xbmc.org/showthread.php?tid=100598 - othrayte - 2012-01-08 Hey, Previously we found a problem with the play/pause/stopped notifications that were created by calls to 'PlayMedia' (usually from a skin) and this affected many skin based add-ons like watchlist etc. whereby the message would always specify type='Movie' and no other info. I was wondering if any progress had been made, or do I need to start a ticket. My belief was that you could look-up the path requested for playing in the db and convert it back to a libraryid and type. Would that work? Also a user just found that the same thing occurs with the official remote I can confirm the messages look like this Code: {"jsonrpc":"2.0","method":"Player.OnStop","params":{"data":{"item":{"type":"movie"},"title":""},"sender":"xbmc"}} Thanks for the great work, I hope XBMC prospers this year and I can't wait to see Eden finished. - Montellese - 2012-01-08 othrayte Wrote:Hey, The problem is essentially the same as reported in http://trac.xbmc.org/ticket/11547 The reason for this is that all media started from a script through the builtin PlayMedia() and everything started through HTTP API are played without properly retrieving the metadata. That's why I introduced the Player.GetItem() method in JSON-RPC which explicitly retrieves the metadata for the currently playing item. This isn't done for announcements because database queries take time and slow other things down. Ideally the problem would be fixed in XBMC's internal PlayMedia function by looking up metadata based on the path but that's very unlikely to happen for Eden. The other very hacky way (which would only solve JSON-RPC notifications) would be to check both video and music database by path if there's no database id for an item coming through the notification system but I didn't have time yet to look into it. - othrayte - 2012-01-08 Montellese Wrote:The problem is essentially the same as reported in http://trac.xbmc.org/ticket/11547Yeah I can understand that it would be a lot of work, it would be best if it happened eventually but for the moment I'll change my end to make the Player.GetItem() requests (which I hadn't noticed existed) whenever it doesn't get enough data. - wuench - 2012-01-09 When I issue the command Player.SetAudiostream next or previous the audiostream changes but the movie also rewinds. Has anyone reported this yet? Code: Sending - {"jsonrpc":"2.0","method":"Player.GetProperties","params":{"playerid":1,"properties":["audiostreams","currentaudiostream","currentsubtitle","percentage","speed","subtitleenabled","subtitles","totaltime","time"]},"id":0} EDIT: Ok it appears to only do it for that one movie (first movie I tried). Haven't been able to duplicate it with others.... So maybe just a screwed up rip?!? - Montellese - 2012-01-10 othrayte Wrote:Yeah I can understand that it would be a lot of work, it would be best if it happened eventually but for the moment I'll change my end to make the Player.GetItem() requests (which I hadn't noticed existed) whenever it doesn't get enough data. I justed pushed a commit (https://github.com/xbmc/xbmc/commit/dd0663108ba2c5f674076630e94a8e3e892e19df) which should (temporarily) fix the problem. It does a database lookup if the item passed to the notification manager does not have a valid database id (but only once) and if it finds additional information it will use that in the notification sent out to the clients. I hope this fixes the invalid data in the Player notifications. - othrayte - 2012-01-10 Montellese Wrote:I justed pushed a commit (https://github.com/xbmc/xbmc/commit/dd0663108ba2c5f674076630e94a8e3e892e19df) which should (temporarily) fix the problem. It does a database lookup if the item passed to the notification manager does not have a valid database id (but only once) and if it finds additional information it will use that in the notification sent out to the clients. I hope this fixes the invalid data in the Player notifications. Cool thanks, I'll try it out when it gets into a build. Files.GetDirectory - giftie - 2012-01-10 Has there been some changes to Files.GetDirectory? I use this often in my script Cinema Experience and lately it seems to be broken(from what it used to be) The call that is made is: Code: {"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "/home/xbmc/Cinema Experience Stuff/Videos/Audio/DTSHD-MA/", "media": "video"}, "id": 1} The log shows the following: Code: 22:12:59 T:2718952304 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "/home/xbmc/Cinema Experience Stuff/Videos/Audio/DTSHD-MA/", "media": "video"}, "id": 1} The Folder does have two videos inside it: Code: hd_dts_living_world_of_audio_lossless.m2ts If I drop the "media": "video", or use "media": "files" I do get the full directory back: Code: { It seems to ignore the files since they report as "type": "unknown" or since they don't have an Id(MovieId, EpisodeIs, MusicVideoId) - Montellese - 2012-01-10 Thanks for the report giftie. I fixed it in https://github.com/xbmc/xbmc/commit/6aa04be25d47b654d45c906ced9d5affe74e43e8. You were right if the file was not in the database and XBMC wasn't able to retrieve any meta-data from it, it simply didn't show up in the response. - samdret - 2012-01-10 Sorry if this has been asked a lot, but I can't seem to find any information regarding it. After I've called JSONRPC.Introspect and gotten a list of available commands, where can I get information on which parameters each command accepts? I.e. I would like more than just label and id when I call VideoLibrary.GetRecentlyAddedMovies - Montellese - 2012-01-10 samdret Wrote:Sorry if this has been asked a lot, but I can't seem to find any information regarding it. Unless you are using Dharma, JSONRPC.Introspect provides you will all the information about every parameter of every method. You can also find some (limited) information on the wiki. In case you are using Dharma I recommend to either wait till Eden stable has been released or if you can't wait update to Eden Beta 1 and to take a look at the new introspect. Concerning your question on VideoLibrary.GetRecentlyAddedMovies: You must specify the additional information you want in the "properties" parameter as an array of strings (e.g. [ "title", "rating", "thumbnail" ]). - Mizaki - 2012-01-10 Should Player.SetSubtitle and Player.SetAudioStream trigger GUI notifications? Currently they don't seem to. - Montellese - 2012-01-10 What do you mean by GUI notification? A notification dialog telling you that you switched to audiostream XYZ? Don't you know that already because you initiated the action? AFAIK there's no such thing in XBMC. |