2020-08-10, 08:17
(2020-08-09, 20:54)pkscout Wrote:(2020-08-09, 14:06)eldrik Wrote: Hi,Probably (that's the best answer I can give).
stumbled over this perfect addon while searching for an audio switcher, one question can I switch through the profiles using kodi jsonrpc? And what would a json string look like?
There is a JSONRPC call for ExecuteAddon:
https://kodi.wiki/view/JSON-RPC_API/v10#...ecuteAddon
You'll need to figure out how to send the extra parameter for "rotate through the audio profiles," which you can find in the Audio Profiles wiki:
https://kodi.wiki/view/Add-on:Audio_Prof...ng_Keymaps
The item after the comma in the RunScript command is the extra parameter you'd need to send. I've never used the ExecuteAddon JSONRPC call, so I'm not sure exactly how that would be done.
figured it out
I can switch to profile 1 via
Code:
{"jsonrpc": "2.0", "id": 1, "method": "Addons.ExecuteAddon", "params": { "addonid": "script.audio.profiles", "params": ["1"] } }
and profile 2 via
Code:
{"jsonrpc": "2.0", "id": 1, "method": "Addons.ExecuteAddon", "params": { "addonid": "script.audio.profiles", "params": ["0"] } }
Eldrik