2022-01-16, 14:22
Apologies if this isn't the correct forum, I'm not a developer, but this seemed the best place to bring up problems with the API.
On one of my kodi installs (details below), when I pause a video, the websocket interface sends extra Player.OnAVChange messages, with incorrect information regarding speed. Thus:
<pause video using any interface>
NB if I then ask Kodi via websocket what the current speed is, I get the correct answer:
<I send:>
19.3.0
osmc vero 4k+ (2021.12-1)
FWIW the reason this is an issue for me is that it is screwing with automations triggered in Home Assistant.
This problem isn't specific to the video being played, but it does not occur on the 2 * libreelec pi 4's I have, although they are running 19.1.
On one of my kodi installs (details below), when I pause a video, the websocket interface sends extra Player.OnAVChange messages, with incorrect information regarding speed. Thus:
<pause video using any interface>
json:
{"jsonrpc":"2.0","method":"Player.OnPause","params":{"data":{"item":{"id":330,"type":"movie"},"player":{"playerid":1,"speed":0}},"sender":"xbmc"}}
{"jsonrpc":"2.0","method":"Player.OnAVChange","params":{"data":{"item":{"id":330,"type":"movie"},"player":{"playerid":1,"speed":1}},"sender":"xbmc"}}
{"jsonrpc":"2.0","method":"Player.OnAVChange","params":{"data":{"item":{"id":330,"type":"movie"},"player":{"playerid":1,"speed":1}},"sender":"xbmc"}}
NB if I then ask Kodi via websocket what the current speed is, I get the correct answer:
<I send:>
reply:json:
{"jsonrpc": "2.0", "method": "Player.GetProperties", "params": {"playerid": 1, "properties": ["speed"]}, "id": 0}
<then unpause>json:
{"id":0,"jsonrpc":"2.0","result":{"speed":0}}
json:
{"jsonrpc":"2.0","method":"Player.OnResume","params":{"data":{"item":{"id":330,"type":"movie"},"player":{"playerid":1,"speed":1}},"sender":"xbmc"}}
{"jsonrpc":"2.0","method":"Player.OnAVChange","params":{"data":{"item":{"id":330,"type":"movie"},"player":{"playerid":1,"speed":1}},"sender":"xbmc"}}
{"jsonrpc":"2.0","method":"Player.OnAVChange","params":{"data":{"item":{"id":330,"type":"movie"},"player":{"playerid":1,"speed":1}},"sender":"xbmc"}}
19.3.0
osmc vero 4k+ (2021.12-1)
FWIW the reason this is an issue for me is that it is screwing with automations triggered in Home Assistant.
This problem isn't specific to the video being played, but it does not occur on the 2 * libreelec pi 4's I have, although they are running 19.1.