2013-11-14, 14:34
Hi,
I'm trying to control my OpenELEC flavour of XBMC using the JSON RPC methods. I'm using the Google Chrome Simple REST Client to test. I have placed a photo and video file in the Media directory on my XBMC instance and this is available via SMB on the IP it's got \\192.168.0.170\Media
So far so good. Now I try to show the two items using the REST Client with:-
URL: http://192.168.0.170/jsonrpc
Header: Content-Type: application/json
Data: {"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"/media/MyVideo.wmv"}}}
and also
Data: {"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"/media/MyPhoto.JPG"}}}
Both of the above Data requests work fine, and come straight up on XBMC.
Now same experiment with spaces in title (I've renamed files in the Media folder by adding the space after "My")
Data: {"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"/media/My Photo.JPG"}}}
The above works fine still.
Data: {"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"/media/My Video.wmv"}}}
The above returns a parameter error.
{"error":{"code":-32602,"message":"Invalid params."},"id":"1","jsonrpc":"2.0"}
Any ideas? It's driving me crazy, also I've tried URL encoding the data, but hasn't helped.
Thanks
Dean Bennett
I'm trying to control my OpenELEC flavour of XBMC using the JSON RPC methods. I'm using the Google Chrome Simple REST Client to test. I have placed a photo and video file in the Media directory on my XBMC instance and this is available via SMB on the IP it's got \\192.168.0.170\Media
So far so good. Now I try to show the two items using the REST Client with:-
URL: http://192.168.0.170/jsonrpc
Header: Content-Type: application/json
Data: {"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"/media/MyVideo.wmv"}}}
and also
Data: {"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"/media/MyPhoto.JPG"}}}
Both of the above Data requests work fine, and come straight up on XBMC.
Now same experiment with spaces in title (I've renamed files in the Media folder by adding the space after "My")
Data: {"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"/media/My Photo.JPG"}}}
The above works fine still.
Data: {"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"/media/My Video.wmv"}}}
The above returns a parameter error.
{"error":{"code":-32602,"message":"Invalid params."},"id":"1","jsonrpc":"2.0"}
Any ideas? It's driving me crazy, also I've tried URL encoding the data, but hasn't helped.
Thanks
Dean Bennett