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 - Montellese - 2012-03-16 JSON-RPC does not support any recursive behaviour for directories etc (yet). So if you point it at a directory that only contains sub-directories it won't find anything useful in that directory because it doesn't look into the subdirectories. (2012-03-16, 23:02)MindTooth Wrote: Response: Hm that's rather odd and would suggest that there are no episodes for the TV show with ID 50 (i.e. Dexter in your case). Do you see any episodes belonging to Dexter in the tv show view of XBMC? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Millencolin007 - 2012-03-17 Hi, I was trying to stream files using the vfs path but it looks like my "range request" headers are ignored since it returns the full file every time (tested on Eden RC2 and Eden Beta 1). Unfortunately it is not possible to seek inside a music file or movie without the support of range requests. Is this going to be supported in the future? First Request Code: GET /vfs/E%3a%2fMusic%2fMichael%20Jackson%20%2d%20Number%20Ones%20%2d%202003%2f03%20%2d%20Michael%20Jackson%20%2d%20Billie%20Jean%2emp3 HTTP/1.1 Range Request Code: GET /vfs/E%3a%2fMusic%2fMichael%20Jackson%20%2d%20Number%20Ones%20%2d%202003%2f03%20%2d%20Michael%20Jackson%20%2d%20Billie%20Jean%2emp3 HTTP/1.1 RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-03-18 (2012-03-17, 12:28)Millencolin007 Wrote: Hi, Uhm what does this have to do with JSON-RPC? Sure it has to do with the webserver but not with JSON-RPC. Please create a feature request ticket on Trac. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Millencolin007 - 2012-03-18 Oh, I didn't know that the vfs is not part of json-rpc but from the webserver module. After a bit of searching I found a ticket describing the same issue at http://trac.xbmc.org/ticket/11524 so I won't open another one RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-03-18 The VFS is part of XBMC and it is exposed through the webserver and it can also be used through JSON-RPC but JSON-RPC currently doesn't support any direct file access/streaming so it's a new feature for the webserver. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mzanetti - 2012-03-18 (2012-03-16, 00:17)Montellese Wrote: It returns Invalid Parameter if there is no valid file in the directory you provided does not contain any playable files. Hmm... It returns also Invalid Parameter for directories which contain valid images (used to create a slideshow with pictures). Could it be that a few months back the Playlist.Add has been working in a recursive mode? I feel so certain that this has been working when I implemented the Files stuff in my client... Thanks RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-03-19 The only place where you get recursive behaviour in JSON-RPC is if you provide the "recursive" parameter in Player.Open for slideshows. Hm the picture/slideshow handling in the Playlist namespace is a bit of a hack because XBMC handles slideshows completely different than video or audio playlists. Furthermore there's no picture database as there is for audio and video so it might be that JSON-RPC behaves a little different when it comes to pictures/images in the Playlist namespace. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - grifter - 2012-03-20 I think I may have uncovered a JSON bug if I want to play a video file named XYZ.JPG i send the command Code: {"jsonrpc": "2.0", "method": "Playlist.Add","params": {"playlistid": 1, "item": {"file" : "smb://homestorage/XYZ.JPG"}}, "id": 1} But if I try to play the following Top Gear episode that contains a "ü" in the filename it fails. Code: {"jsonrpc": "2.0", "method": "Playlist.Add","params": {"playlistid": 1, "item": {"file" : "smb://homestorage/Array2/Movies/RSS/Top Gear/Season 06/Top Gear - 6x07 - Ford Transit at Nürburgring.avi"}}, "id": 1} tried this next to see if I could escape the "ü" Code: {"jsonrpc": "2.0", "method": "Playlist.Add","params": {"playlistid": 1, "item": {"file" : "smb://homestorage/Array2/Movies/RSS/Top Gear/Season 06/Top Gear - 6x07 - Ford Transit at N\ürburgring.avi"}}, "id": 1} also doesn't work, however renaming the file to remove the "ü" and it works. I have also recreated this on a few other files containing similar characters. "Top Gear - 7x04 - £10.mpg" "¡Rob! - 1x01 - Pilot.mpg" Thoughts? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2012-03-20 I think you should unicode your filename : Code: filename = unicode("smb://homestorage/Array2/Movies/RSS/Top Gear/Season 06/Top Gear - 6x07 - Ford Transit at Nürburgring.avi", 'utf-8', errors='ignore') RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-03-20 As mikebzh44 JSON-RPC is completely UTF-8 based so that's what you should send. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mzanetti - 2012-03-21 While it is true that escaping/encoding the filenames properly leads mostly to success, I also have noticed some strange behavior if the files are located on a mounted share which uses a different encoding that then the machine xbmc runs on. For example I had issues that local files (on the xbmc host) with special characters have been working but remote ones (on a mounted share) not. After UTF-8 encoding my commands I only could open the remote ones, but not the local ones any more. I have also reported a bug for this back then: http://trac.xbmc.org/ticket/11634 @grifter: It might help if you add your findings there so we might can see a pattern which makes it easier to find the issue. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - grifter - 2012-03-21 (2012-03-20, 04:34)grifter Wrote: I think I may have uncovered a JSON bug Thanks to Mzanetti, Montellese and Mikebzh44, UTF-8 did the trick! @mzanetti, I have re-tested the 3 files I have, loading them off of a Windows UNC path from an Apple TV running XBMC and they all work fine. I will try moving small files with the same filenames local to the Apple TV and test again. I also have a few windows XBMC machines kicking around the house I can test. If I find any problems I will post them to http://trac.xbmc.org/ticket/11634 Thanks again to all that replied. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Juan_Garcia - 2012-03-22 Hello. First, sorry for my poor english. I´m thinking to make a app for iPhone/iPad, where you navigate for internet with a embebbed browser... when the app detect a video´s link in current web page, let to the user to send the url to XBMC (I don´t want airplay). Besides the url I want to send the session (cookie header) too for autenthication sites (XBMC should be in the same intranet), it´s possible to do it with current api? or maybe I need to make a plugin first? Thanks RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-03-22 You can send any URL to XBMC through Player.Open using the "file" property of the "item" parameter Code: { "jsonrpc": "2.0", "method:" Player.Open", "params": { "item": { "file": "http://www.xyz.com/foo?bar" } }, "id": 1 } RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Juan_Garcia - 2012-03-22 I see thank you. Do you think this will be supported in the future? |