v17 -  How to Enable one addon from another
Hi there!

I am wondering if there is python code that will allow me to enable one addon, from another.  The addon I am trying to enable has been installed properly, using the add-on installer in Kodi, but has been disabled.

I have 6 devices running Kodi 17.4 using LibreElec (Windows x86/Android TV/Pi at 4 locations, and I access them via SSH.  I can remote in and try to enable the addon remotely, but it would be far better if I could get my one addon to check on the statuys of the other addon upon start.  And if it is disabled, enable it.  :-)

I have 2 addons; pluging.video.testaddon & plugin.video.demoaddon

In order for  pluging.video.testaddon to work, plugin.video.demoaddon bust be enabled.  plugin.video.demoaddon gets disabled when the system updates (LibreElec updates).  If I go into addons and enable it, it works fine, but I am not local t these machines and I cannot do that.  It is nearly impossible for be to walk the elderly folks, who are using the devices, through enabling the addons lol.

So I need pluging.video.testaddon, when it starts up, to check if plugin.video.demoaddon is enabled.  If not, it needs to enable it.

Is this possible?

I have searched and found the following thread (https://forum.kodi.tv/showthread.php?tid...able+addon), which suggests the following format:

import xbmc
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id":1, "method": "Addons.SetAddonEnabled", "params": { "addonid": "plugin.video.demoaddon ", "enabled": false }}')

I have added this line into startup.py in pluging.video.testaddon, but had no luck so far.

Thanks so much for your time!!
As this could be used to override one of kodi security features, discussion of it is not allowed here.
| Banned add-ons (wiki) | Forum rules (wiki) | First time user (wiki) | FAQs (wiki) | Troubleshooting (wiki) | Add-ons (wiki) | Free content (wiki) | Debug Log (wiki) | Free Movies/TV Shows |
Ooh!  Really?  So sorry, I had no idea.

My bad.  I will stick to Google searches.

(2017-11-14, 20:49)kenmills Wrote: import xbmc
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id":1, "method": "Addons.SetAddonEnabled", "params": { "addonid": "plugin.video.demoaddon ", "enabled": false }}')

while i wouldn't advice you to run some code you 'found' somewhere without some basic understanding about what it actually does,
the 'enabled: false' part might give you a clue this in fact disables an addon ;-)

fix that and if it still fails, enable debug logging and observe the kodi logfile.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Hey Ronie, yes thx!  Sorry that was a typo on my part.  I have been testing the code parameters and it should be true.

I'm now enabling debug logging and testing again.

Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
How to Enable one addon from another00