2013-05-03, 23:23
(2013-05-03, 17:43)Millencolin007 Wrote: I have seen that xbmc sometimes does return the volume as float instead of an int when calling Application.GetProperties. In the json introspect file it is defined as int. Has something been changed recently?
Code:curl -H "Content-Type: application/json" -d "{\"jsonrpc\": \"2.0\", \"method\": \"Application.GetProperties\", \"params\" : { \"properties\" : [ \"volume\", \"muted\" ] }, \"id\" : 1 }" http://xbmc:80/jsonrpc | python -mjson.tool
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"muted": false,
"volume": 15.000000953674316
}
}
Edit:
Tried on: XBMC for Raspbmc 13.0-ALPHA3 Git:20130429-a7a45c4
Nice find. IIRC the return value of CApplication::GetVolume() has changed a while ago from an integer to a float which also affects JSON-RPC. I'll make sure it will return int again.