2020-05-22, 21:42
(2020-05-22, 14:24)madkat Wrote:(2020-05-22, 05:25)madkat Wrote:I'm not seeing any notifications though...? (Connected via TCP)(2020-05-22, 05:20)madkat Wrote: Can anyone give me a working example of subscribing to notifications?Scratch that, I'm getting somewhere now:
When I pass this:
json:{"jsonrpc": "2.0", "method": "Configuration.Notifications", "id": 1}
I get this:
json:{"error":{"code":-32601,"message":"Method not found."},"id":1,"jsonrpc":"2.0"}
json:{"jsonrpc": "2.0", "method": "JSONRPC.SetConfiguration", "params": {"Configuration.Notifications": { "PVR": true, "Player": true }}, "id": 1}
I am seeing notifications - e.g. play/pause.
New problem with Live TV: I pass this method invocation:
json:{"jsonrpc": "2.0", "method": "Player.GetProperties", "params":{"playerid":1,"properties":["totaltime","time"]}, "id": 1}
And I get back a perfectly sensible reply:
json:{"id":1,"jsonrpc":"2.0","result":{"time":{"hours":0,"milliseconds":0,"minutes":40,"seconds":11},"totaltime":{"hours":1,"milliseconds":
0,"minutes":0,"seconds":0}}}
However, the "time" is the time of the stream, not the time of the playing programme - if I pause, the "time" returned continues to increase. Do I need to do something with the PVR to get the state information I'm looking for?