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
|
- _Andy_ - 2010-11-15 I like to query the music artists with sortmethod ascending. Is this possible? I only get parse errors. - Montellese - 2010-11-15 How does your JSON RPC call look like? - _Andy_ - 2010-11-15 Sorry 4 posting. I found my error. I missed one } at the end of the ascending method. Following my solution. Maybe it's helpful for someone. NSString *json = @"{\"jsonrpc\": \"2.0\", \"method\": \"AudioLibrary.GetArtists\", \"params\": {\"fields\": [\"artist\"],\"sort\":{\"method\":\"artist\",\"order\":\"ascending\"}},\"id\": 1}"; - Montellese - 2010-11-15 I already thought that there might be such a small syntax problem - grywnn - 2010-11-17 I'd like to push a request that's been here before: Querying movie items by movieid. Background: - I've got a set of movie items that don't show up on VideoLibrary.GetMovies (because they are in a movie set), but lets say i know their movieids. I've tried hard but i couldn't find a way to get movie details for these via JSON. - Since the movieid is the leading / unique identifier it would simply make sense (imho) to be able to query items by id. I know this can be done by sorting and start / end filtering, but: To know the items position in the list, i need to query the whole list first (if i'm not mistaken?) - and: Who guaranties the the items position didn't change between the initial list query and the filtered query? Keep up the good work! - blinkseb - 2010-11-17 grywnn Wrote:I'd like to push a request that's been here before: I'm planning to add a way to query movie/music infos by id soon, as topfs seems very busy right now. Indeed, json announcements will take an id as parameter, allowing the recever to query informations about the announcements (ie, OnNewSong will pass the id of the new song added to the db, etc.) I just need to find some free time to do it and have a talk with topfs before too - grywnn - 2010-11-17 Perfect! - topfs2 - 2010-11-17 blinkseb Wrote:I'm planning to add a way to query movie/music infos by id soon, as topfs seems very busy right now. Indeed, json announcements will take an id as parameter, allowing the recever to query informations about the announcements (ie, OnNewSong will pass the id of the new song added to the db, etc.) I think its a good idea but when I coded the stuff I tried to do it and some stuff are really hard to get (mind you, quick look) with just the ID. Thumbs and stuff for one, there have been discussion of moving that info into the db though. At any rate, its a good idea for sure. Only thing that might need to be noted is that don't rely on the ID's to always be the same, currently they probably are but its just safer code if you don't. - grywnn - 2010-11-18 topfs2 Wrote:At any rate, its a good idea for sure. Only thing that might need to be noted is that don't rely on the ID's to always be the same, currently they probably are but its just safer code if you don't. Sure thing. While i'm at it: Any news on movie sets? I still have the problem that i get one dict per movie set when doing a VideoLibrary.GetMovies and have no way of getting the movies within. Currently i'm doing this by falling back to http database queries. Btw thats where i get movieids which aren't in the initial VideoLibrary.GetMovies array. I know this is rather db related than json-rpc, just curious if this is still on the screen somewhere. - blinkseb - 2010-11-20 I've got some free time today, so here we go : http://trac.xbmc.org/ticket/10728 Four new json methods, each allowing to retrieve informations about a specific movie/tvshow/episode/music video I'll add the same thing for music library if it's relevant. - Jordan - 2010-11-20 blinkseb Wrote:Four new json methods, each allowing to retrieve informations about a specific movie/tvshow/episode/music videoThis is awesome. Its just what I needed. Do you guys know when you will be working on functionality to update the database for things like play count, file bookmarks, etc. I realize there is a security issue here you want to solve first. And I believe in the meantime I can use the HTTP API to run sql statements to do this. I also have a question about GetTVShows. Is it possible to get the number of episodes and number of watched episodes in this request? I took a look at the source code and it looks like it ultimately goes through CVideoDatabase::GetTvShowsByWhere which loops through each tv show to get these values. But when I added these fields (totalepisodes, watchedepisodes) to my JSON-RPC request I didn't get the information back. I also want to get the same information from GetSeasons and GetEpisodes. Thanks for the all the work you've put in. - topfs2 - 2010-11-20 Jordan Wrote:This is awesome. Its just what I needed. Do you guys know when you will be working on functionality to update the database for things like play count, file bookmarks, etc. I realize there is a security issue here you want to solve first. And I believe in the meantime I can use the HTTP API to run sql statements to do this. For sure on the roadmap. We will allow any alterations to the database, will jstu not allow any sql querys but instead wrap it into nice little actions. - ZOiD - 2010-11-21 Hi, why can't I use the webserver on port 80? Even if I edit guisettings.xml manually it doesn't work. thanks in advance zoid (sorry, search funtion routed me to a wrong (dev-) section) - topfs2 - 2010-11-21 ZOiD Wrote:Hi, Yeah this is not the place and without a proper Debug Log its impossible.. But I'm gonna take a stab in the dark, if your running linux/osx/live any ports under 1024 are privileged which means you need to be root/admin to use them. Its bad running as root so just use ports above 1024. - ZOiD - 2010-11-21 ... well of course you are right. Solved it with port redirecting with iptables. thanks and sorry again for posting at the wrong place. |