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
|
- marksoccer - 2010-06-29 Is there a way to get the name of TV Show currently playing? I can get the episode name, but not the name of the TV Series. - topfs2 - 2010-06-29 Yes, end will set an upper limit to X first and start will set a lower limit of Y. So if you want just one item you need to set X = Y +1; i.e. start: 1, end: 2; Fanart isn't wrapped atm and biography I'm not even sure what that is (I will create a complete list of the available fields at some point but for now checkout xbmc/lib/libjsonrpc/FileItemHandler.cpp for them) - Fiasco - 2010-06-29 I just dl'd the xbmc source ms express ect so will examine that file. Thanks - marksoccer - 2010-07-01 I took a look at FileItemHandler.cpp and noticed that it is missing a bunch of fields (possibly because the fields are not populated?). Without digging in too far, it looks to me like CVideoInfoTag *videoInfo should have all the info I am looking for such as episode, showTitle, and firstAired. I found the CVideoInfoTag definition in VideoInfoTag.h. Are these fields something that can be easily added to json in the near future? - Kabooga - 2010-07-03 Are there any plans to use songId in the API? - Nuka1195 - 2010-07-10 topfs2, i see you've been real busy with beagle board, but is there any chance you could look at my requests. the patch i submitted, i've since added artist and album to param list for videos. i will submit a new patch if you would consider it. - Kabooga - 2010-07-16 Beuller?.....Beuller?.....Beuller? Looks like a few people are waiting with baited breath........... - dstruktiv - 2010-07-17 Hi there I'm coding a remote control app in .NET C# for Windows. I saw on the Wiki the HTTP API is depreciated (Or will be in the near future). So I'm going with the json api, after a lot of trial and error and reading this thread I've got a basic app up and running which can send/receive info from xbmc. What I'm having trouble with now is pulling the album art of the currently playing song. I'm getting the audio playlist and identifying the current song, then the only method I can see that is even remotely related to getting artwork would be File.Download which is described as "Specify a file to download to get info about how to download it, i.e a proper URL". So I call File.Download on the current songs thumbnail field and I get this (My app log): Code: 7/17/2010 8:03:19 PM - Invoking: {"jsonrpc":"2.0","method":"AudioPlaylist.GetItems","id":1} It's a bit frustrating as we're told not to use the http api but then there's no real doco for the json api Can someone please tell me the correct params to pass for File.Download ? Layout blatantly stolen from Bram77's screen shot in this thread cause I'm not very creative lol. - Tolriq - 2010-07-17 For the moment the goal of File.Download is to give you back the way of getting the file. I'm not really sure it's implemented, there's a talk about that in this thread. The easiest way to get files is just to do : Code: http://ip:port/vfs/special://masterprofile/Thumbnails/Music/c/cf23dc2e.tbn As you will have others missing things in the json implementation, if you want to do all the things others do, you will more or less need http api for the moment and wait for topfs to come back and finish the json part. - topfs2 - 2010-07-17 Yeah, terribly sorry but I have been silly busy with other things (GSoC mostly) but I will return and do much more on the jsonrpc at some point, probably this fall. Regarding File.Download, it just takes a string as parameter not a string array. (Not sure if this is outside jsonrpc spec. :S). Code: "{ jsonrpc":"2.0", "method":"Files.Download","params": "special://masterprofile/Thumbnails/Music/c/cf23dc2e.tbn", "id":1 } But as Tolriq said, this method will just tell you how to download and with the http server its already extremely standardized how it handles it but on the RAW TCP socket it might need to open up a new port for the transfer (like ftp) so those other transports might need to be poked before the download could be initialized, so its mostly a way of future proofing the solution. Cheers, Tobias - dstruktiv - 2010-07-17 Thanks a lot for the responses I really appreciate it Having a problem with vsf now - Thumbnail location is pulled from current song being played and spliced in to a URL: http://127.0.0.1:80/vsf/special://masterprofile/Thumbnails/Music/7/75fd6b81.tbn Response is: File not found But on my PC C:\Users\Tyler\AppData\Roaming\XBMC\userdata\Thumbnails\Music\7\75fd6b81.tbn does exist. And XBMC.log: 21:53:19 T:5400 M:2169430016 NOTICE: WebServer: GET | /vsf/special://masterprofile/Thumbnails/Music/7/75fd6b81.tbn 21:53:19 T:5400 M:2169430016 ERROR: WebServer: Failed to open special://xbmc/web/vsf/special://masterprofile/Thumbnails/Music/7/75fd6b81.tbn Any ideas? - Tolriq - 2010-07-17 Yes sorry my link was about using masterprofile with portable mode and it's vfs not vsf You can use : http://127.0.0.1/vfs/special://userprofile/Thumbnails/Music/7/75fd6b81.tbn For the moment i don't know how to get currently logged profile with json (one the multiple missing things ). For Yatse, i finally go for an hybrid plugin, using http api for getting data dans /vfs to donwload image at the base64 encoding in http api really sucks and slow things down. - topfs2 - 2010-07-17 Tolriq Wrote:Yes sorry my link was about using masterprofile with portable mode System.GetInfoLabels (with a string array) and then use http://wiki.xbmc.org/index.php?title=InfoLabels example: Code: { "jsonrpc": "2.0", "method": "System.GetInfoLabels", "params": ["System.ProfileName"], "id": 1 } Ideally it should probably be moved to XBMC.GetInfoLabels but we just branched, need to discuss abit internally if its sane to move Tolriq Wrote:For Yatse, i finally go for an hybrid plugin, using http api for getting data dans /vfs to donwload image at the base64 encoding in http api really sucks and slow things down. This is probably the best solution so far, and httpapi will easily stay until jsonrpc can do everything httpapi can, probably even one release with them both equal before retireing it is even an option - marksoccer - 2010-07-18 Is there a way to get a sorted list of artists based on artist name (rather than artistid) without manually sorting after receiving the json string? Also, if I decided to add some features and submit them in a patch (and stuff worked correctly), would my patch be accepted? - jmarshall - 2010-07-18 We can't say one way or the other without seeing the patch. It will certainly be considered. Cheers, Jonathan |