forked from s0x/xbmc-rpc-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRPCAPI
68 lines (57 loc) · 1.21 KB
/
RPCAPI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
JSON-RPC request
{
"jsonrpc": "2.0" , // some json rpc version no
"method": "<METHOD>",
"params": <PARAM_OBJECT>, // optional
"id": 1 // not properly inspected yet
}
JSON-RPC response
{
"id": 1, // probably request id
"jsonrpc": 2.0", // some json rpc version no
"result": <RESULT_OBJECT> // result of request
}
METHOD
======
Name: Player.GetActivePlayers
Params: -
Result: [ {playerid: $id, type: $type}, {playerid: ...}, ... ]
######
Name: Player.Open
Params: { item => { "file" => $path } } // params not complete
Result:
$path might be something like this:
plugins://<plugin-name>/<some params>
######
Name: Player.Seek
Params: {"playerid": $pid, "value": $val}
Result: {
"percentage": $p,
"time": {
"hours": $h,
"minutes": $m,
"seconds": $s,
"milliseconds": $ms
},
"totaltime": {
"hours": $h,
"minutes": $m,
"seconds": $s,
"milliseconds": $ms
}
}
$val:
string:
- smallforward
- smallbackward
- bigforward
- bigbackward
number (0-100):
-percentage
object:
{
"hours": $h,
"minutes": $m,
"seconds": $s,
"milliseconds": $ms
}