2016-05-11, 09:38
Hi,
Krypton is still in heavy development but couldn't find big changes regarding the API that has impact on my question and that is how to properly switch LiveTV channels using JSONRPC?
I also know the channelid's don't match the ID's returned by PVR backend so first i'll grab the channel ID's like this
{"jsonrpc":"2.0","method":"PVR.GetChannels","params":{"channelgroupid":2},"id":1}
Results:
{"id":1,"jsonrpc":"2.0","result":{"channels":[{"channelid":1059,"label":"NPO Radio 1"},{"channelid":1029,"label":"NPO Radio 2"}, etc, etc
This works perfect and returns all the information i want for specific channelgroups
Then i'm trying to switch channels like this but it only returns a Parse error. (found several similar examples on the forum)
{"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"channelid":1059},"id":1}
Results:
{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
What am I doing wrong?
I also understand (if i get above working) that Player.Open always stops current playback and then starts new playback, is this still the case ?
Otherwise i was playing to build a check to check if LiveTV is playing and based on those results use Player.Open (if not playing) or just send channel number followed by OK (if possible, need to check first)
Krypton is still in heavy development but couldn't find big changes regarding the API that has impact on my question and that is how to properly switch LiveTV channels using JSONRPC?
I also know the channelid's don't match the ID's returned by PVR backend so first i'll grab the channel ID's like this
{"jsonrpc":"2.0","method":"PVR.GetChannels","params":{"channelgroupid":2},"id":1}
Results:
{"id":1,"jsonrpc":"2.0","result":{"channels":[{"channelid":1059,"label":"NPO Radio 1"},{"channelid":1029,"label":"NPO Radio 2"}, etc, etc
This works perfect and returns all the information i want for specific channelgroups
Then i'm trying to switch channels like this but it only returns a Parse error. (found several similar examples on the forum)
{"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"channelid":1059},"id":1}
Results:
{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
What am I doing wrong?
I also understand (if i get above working) that Player.Open always stops current playback and then starts new playback, is this still the case ?
Otherwise i was playing to build a check to check if LiveTV is playing and based on those results use Player.Open (if not playing) or just send channel number followed by OK (if possible, need to check first)