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
|
tvdb id for episode - othrayte - 2011-06-17 What is the recommended method to get the tvdb id that is stored in the db for a certain episode, why can't I get this with VideoLibrary.GetEpisodeDetails, the Library.Fields.Episode doesn't have a value for the tvdb id or even for the imdb id that is available from VideoLibrary.GetTVShowDetails. And is this page http://wiki.xbmc.org/index.php?title=JSON_RPC maintained by hand, because the Library.Fields.Episode section doesn't list the avaliable fields which for reference are [ "title", "plot", "votes", "rating", "writer", "firstaired", "playcount", "runtime", "director", "productioncode", "season", "episode", "originaltitle", "showtitle", "cast", "streamDetails", "lastplayed", "fanart", "thumbnail", "file" ]. Playing any media with Play() - cinusek - 2011-06-18 In my utility I want XBMC to display any kind of media it supports. I am using the XBMC.Play method and pass it URL to the resource on the Internet. It works fine with video files but not with images. The same images are displayed correctly when I use UPnP to control XBMC but I prefer json-rpc. Is the Play method limited by design or is it a bug that I need to report? I've tested on XBMC 10.1 on Windows and a bit older version on Linux. - Montellese - 2011-06-18 I want to start with an FYI: With commit 482cb54953c7a450a4ff you can now use GetRecentlyAddedAlbums and GetRecentlyAddedSongs in the AudioLibrary namespace. othrayte Wrote:What is the recommended method to get the tvdb id that is stored in the db for a certain episode, why can't I get this with VideoLibrary.GetEpisodeDetails, the Library.Fields.Episode doesn't have a value for the tvdb id or even for the imdb id that is available from VideoLibrary.GetTVShowDetails.XBMC does not store a tvdb id per episode but only per tvshow so that's why you can't retrieve it on a per episode base. othrayte Wrote:And is this page http://wiki.xbmc.org/index.php?title=JSON_RPC maintained by hand, because the Library.Fields.Episode section doesn't list the avaliable fields which for reference are [ "title", "plot", "votes", "rating", "writer", "firstaired", "playcount", "runtime", "director", "productioncode", "season", "episode", "originaltitle", "showtitle", "cast", "streamDetails", "lastplayed", "fanart", "thumbnail", "file" ].No the current status of that page was autogenerated but as you can see it is far from perfect. Managing it by hand would be a too time-consuming task. Furthermore with some of my recent changes I broke my tool to auto-generate the wiki article so that's why there are no updates right now. cinusek Wrote:In my utility I want XBMC to display any kind of media it supports. I am using the XBMC.Play method and pass it URL to the resource on the Internet. To view images you should use the XBMC.StartSlideshow() command but that one currently only accepts a directory as a parameter. Please create a feature request ticket on trac and when I got the time I'll look into it and see in which command it will fit best. - othrayte - 2011-06-18 Montellese Wrote:XBMC does not store a tvdb id per episode but only per tvshow so that's why you can't retrieve it on a per episode base. Yes, but nether does it store the title of the show ('showtitle') for each episode, so it would already have to got to the tvshow to get that. Each episode has an entry for the associated tvshowid and as such is associated with a specific 'tvshow' and that is where the 'tvdbnumer' would come from. I would just use GetTVShowDetails (ie pull the associated tvshow entry) for the episode except that the jsonrpc currently has no way (that i've found) of getting the tvshowid given the episodeid which i would need to pass to that method. Thanks for your help and I understand now about the wiki, maybe it would be useful to have a link somewhere to the raw interface definition. - Montellese - 2011-06-18 othrayte Wrote:Yes, but nether does it store the title of the show ('showtitle') for each episode, so it would already have to got to the tvshow to get that. Each episode has an entry for the associated tvshowid and as such is associated with a specific 'tvshow' and that is where the 'tvdbnumer' would come from. I am working on providing the IDs for genre, sets, tvshows etc (depending on the object) in such calls so that would solve your problem. othrayte Wrote:Thanks for your help and I understand now about the wiki, maybe it would be useful to have a link somewhere to the raw interface definition. IMO the best you can do is either use the simple JSONRPC.Introspect call or if you use a very recent nightly build you could make even better use of it by using the newly introduced "filter" parameter which lets you view the json schema definition of a single method (which is much easier to read than the full introspect output). - othrayte - 2011-06-18 Montellese Wrote:I am working on providing the IDs for genre, sets, tvshows etc (depending on the object) in such calls so that would solve your problem. I had found that I can fall back to just the title ect for the moment, but I'll defiantly be looking out for this so that I can make own add-on properly robust. This does seem like the most logical way of doing it, it could become a nightmare if episode details had to support every thing from tvshow or genre. - Nick8888 - 2011-06-19 Could someone tell me which call will play a song from its songid. i.e. clear playlist and play the song. XBMC.Play used to be able to do this but now cannot take a songid as a param. I know this can be done with separate calls but I'd prefer to do it with one. - carmenm - 2011-06-20 I was wondering if it was already possible to send multiple commands at once in one single json call? it would be very helpful when you want for example to: - clear the VideoPlaylist - insert multiple items in it -start playing All at once (which would require the commands to be performed in the right order) Thanks - topfs2 - 2011-06-20 carmenm Wrote:I was wondering if it was already possible to send multiple commands at once in one single json call? check batch requests in json-rpc 2.0 spec (essentially array of requests), we support them in mainline. Not sure if we do in dharma though - Montellese - 2011-06-20 It's not available for Dharma. - carmenm - 2011-06-20 I am using the nightly builds, so it should it be available. right? Thanks - Montellese - 2011-06-20 Yeah it should. You should be able to send them in a single HTTP request or over TCP by putting all the jsonrpc requests in an array Code: [ - carmenm - 2011-06-20 Just tested it. It works like a charm!!!! THANK YOU, you made my day - Montellese - 2011-06-22 I just made a few commits to fix a few bugs and add new functionality. There are two new methods Export and Clean in AudioLibrary and VideoLibrary and ScanForContent has been renamed to Scan. Furthermore the "thumbnail" field is now always returned when it is requested even if it's empty. XBMC.Play error - pfeifer - 2011-06-24 I am trying to use XBMC.Play I am using XBMC Git:20110623-b2c2053 This is my python command Code: { Don't work. Where is the error? Bye Pfeifer |