2012-01-02, 11:05
wuench Wrote:I am trying to use Player.SetSpeed. When passing a zero or negative value I am getting back the error, positive values work.
If I don't quote the values I get:
{"jsonrpc":"2.0","method":"Player.SetSpeed","params":{"playerid":1,"speed":-1},"id":0}
{"error":{"code":-32602,"data":{"method":"Player.SetSpeed","stack":{"message":"Received value does not match any of the union type definitions","name":"speed","type":["string","integer"]}},"message":"Invalid params."},"id":0,"jsonrpc":"2.0"}
If I quote the values I get:
{"jsonrpc":"2.0","method":"Player.SetSpeed","params":{"playerid":1,"speed":"-4"},"id":0}
{"error":{"code":-32602,"data":{"method":"Player.SetSpeed","stack":{"message":"Received value does not match any of the defined enum values","name":"speed","type":["string","integer"]}},"message":"Invalid params."},"id":0,"jsonrpc":"2.0"}
Running Eden Beta 1.
Am I constructing the command correctly?
No it was broken in XBMC because I introduced union types. I fixed it in https://github.com/xbmc/xbmc/commit/fabc...f11af6253c
Thanks for reporting it.