v18 Toggle Addon enabled/disabled via JSON-RPC
#1
Trying to figure out a way to toggle an addon, enabled or disabled.

I want to use the JSON-RPC to work it out if it is enabled to begin with and disable if enabled and vice versa.

Code:
curl -X POST -H "content-type:application/json" http://localhost:
8080/jsonrpc -d '{"jsonrpc":"2.0","method":"Addons.SetAddonEnabled","id":7,"pa
rams":{"addonid": "$id","enabled":true}}'

How can i get the status of the addon if it is enabled or not
Reply
#2
{"jsonrpc": "2.0", "id": 1, "method": "Addons.GetAddonDetails","params":{"addonid":"script.cu.lrclyrics","properties":["enabled"]}}

Result

{"id":1,"jsonrpc":"2.0","result":{"addon":{"addonid":"script.cu.lrclyrics","enabled":false,"type":"xbmc.python.lyrics"}}}
Learning Linux the hard way !!
Reply
#3
(2019-07-28, 17:40)mfizz Wrote: Trying to figure out a way to toggle an addon, enabled or disabled.

I want to use the JSON-RPC to work it out if it is enabled to begin with and disable if enabled and vice versa.

Code:
curl -X POST -H "content-type:application/json" http://localhost:
8080/jsonrpc -d '{"jsonrpc":"2.0","method":"Addons.SetAddonEnabled","id":7,"pa
rams":{"addonid": "$id","enabled":true}}'

How can i get the status of the addon if it is enabled or not

For a single addon:
https://kodi.wiki/view/JSON-RPC_API/v8#A...donDetails

For all installed addons:
https://kodi.wiki/view/JSON-RPC_API/v8#Addons.GetAddons
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Twitter | Help?
Reply
#4
Thanks guys that was simple enough
Reply
#5
Hello , can someone help me create toggle addon enabled/disabled for docker ?
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Toggle Addon enabled/disabled via JSON-RPC00