2014-12-08, 09:11
I am playing with XBMC and sending it JSON commands using the TCP interface. Simple commands without properties (e.g JSONRPC.Version) work fine, so I believe the TCP code is correct.
What I want to do is send XBMC a path to a file on my NAS that I want it to immediately play. The NAS is named "Tower" and has a full SMB server which works fine with things like the Dune player I send it:
{"jsonrpc":"2.0","method":"Player.Open","id":1,"params":{"item":{"file":"smb://Tower/movies/skyfall/skyfall.avi"}}}
which it accepts. I then send it a play command:
{ "jsonrpc": "2.0", "method": "Player.PlayPause", "params": { "playerid": 0 }, "id": 1}
which it rejects with an error code of -32100 which is that it did not accept the method. The issue is that there are no players active as verified by a command to get the active player Player.GetActivePlayers returning an empty result.
How do what I am trying to do? How do you set the active player?
Any help appreciated.
What I want to do is send XBMC a path to a file on my NAS that I want it to immediately play. The NAS is named "Tower" and has a full SMB server which works fine with things like the Dune player I send it:
{"jsonrpc":"2.0","method":"Player.Open","id":1,"params":{"item":{"file":"smb://Tower/movies/skyfall/skyfall.avi"}}}
which it accepts. I then send it a play command:
{ "jsonrpc": "2.0", "method": "Player.PlayPause", "params": { "playerid": 0 }, "id": 1}
which it rejects with an error code of -32100 which is that it did not accept the method. The issue is that there are no players active as verified by a command to get the active player Player.GetActivePlayers returning an empty result.
How do what I am trying to do? How do you set the active player?
Any help appreciated.