Kodi Community Forum

Full Version: Enable/Disable Addon via JSON-RPC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Where is the file in which are the states of the addons to be able to deactivate / activate them manually in ssh or samba?
like this @Karellen-Log removed but in SSH
Hello @jose383

Please be aware of our Forum Rules. We do not allow references to add-ons that enable you to view Piracy or Copyright Infringing content. Your youtube link was packed full of it.
(2017-11-24, 01:28)Karellen Wrote: [ -> ]Hello @jose383

Please be aware of our Forum Rules. We do not allow references to add-ons that enable you to view Piracy or Copyright Infringing content. Your youtube link was packed full of it.
 Sorry, it was not my intention to show some pirated content.
There is a thread about this very recently. You can do it via JSON-RPC
(2017-11-25, 06:46)nickr Wrote: [ -> ]There is a thread about this very recently. You can do it via JSON-RPC
 I do not know that protocol, how can I use it to deactivate an addon in the ssh console?
I assumed you would look at the wiki http://kodi.wiki/?title=JSON-RPC_API
(2017-11-25, 21:32)nickr Wrote: [ -> ]I assumed you would look at the wiki http://kodi.wiki/?title=JSON-RPC_API
 I have read it, but I do not understand it, I do not have advanced knowledge.
I just wanted to know where the variable that says if an addon is activated or deactivated is stored to be able to deactivate it by ssh without having to be in front of the interface. My intention is to access it by ssh and edit said file.
It is in the addons database. Do not write directly to databases, use JSON.

The section for enabling/disabling addons is http://kodi.wiki/view/JSON-RPC_API/v8#Ad...donEnabled
(2017-11-29, 08:56)nickr Wrote: [ -> ]It is in the addons database. Do not write directly to databases, use JSON.

The section for enabling/disabling addons is http://kodi.wiki/view/JSON-RPC_API/v8#Ad...donEnabled
 I use this request:
http://IP:8080/jsonrpc?request= {"jsonrpc": "2.0", "method": "Global.Toggle", "params": {"pvr.hts", "disabled"}, "id": 1}
But I only recived this:
{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
SOLUTION:
http://IP:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "Addons.SetAddonEnabled", "params": {"addonid": "the-addon-id", "enabled":can-be-true-or-false}, "id": 1}