2011-09-27, 18:14
Hi, I'm trying to use the Player.Shuffle JSON command but it's being a little hairy. I've got it to work once or twice, but right now it's not having any effect. I'm using the latest nightly build.
Sorry for the ambiguity; I guess my question is, are there any known problems with the command? If not I will try to debug this some more.
Here is my c# debug output:
Calling JSON RPC method "Player.Shuffle"...
JSON RPC call: {
"jsonrpc": "2.0",
"method": "Player.Shuffle",
"params": {
"playerid": 0
},
"id": 5
}
JSON RPC response: {"id":5,"jsonrpc":"2.0","result":"OK"}
EDIT: I found the PlayerControl() function online. Interestingly, using the deprecated HTTP API, PlayerControl(Random,true) Works
However, in conjunction with JSON XBMC.Open(), it only worked after adding Thread.Sleep(10000) calls in between XBMC.Open and HTTP-API PlayerControl(Repeat, true) calls
Sorry for the ambiguity; I guess my question is, are there any known problems with the command? If not I will try to debug this some more.
Here is my c# debug output:
Calling JSON RPC method "Player.Shuffle"...
JSON RPC call: {
"jsonrpc": "2.0",
"method": "Player.Shuffle",
"params": {
"playerid": 0
},
"id": 5
}
JSON RPC response: {"id":5,"jsonrpc":"2.0","result":"OK"}
EDIT: I found the PlayerControl() function online. Interestingly, using the deprecated HTTP API, PlayerControl(Random,true) Works
However, in conjunction with JSON XBMC.Open(), it only worked after adding Thread.Sleep(10000) calls in between XBMC.Open and HTTP-API PlayerControl(Repeat, true) calls