how does kodi communicate the enabled status?
#1
Does anyone know where you would fine the function that tells kodi that an add-on is enabled?
such as pvr.iptvsimple
<setting id="Enabled" default="True" />
Reply
#2
From python try:
Code:
xbmc.getCondVisibility(System.HasAddon(scriptID))

Within a skin you would use something like:
Code:
<visible>System.HasAddon(scriptID)</visible>

All the conditionals in Kodi are at http://kodi.wiki/view/List_of_boolean_conditions
Reply
#3
Thanks for the reply pkscount, but I've tried with no success for pvr.iptvsimple

I've put it in a default.py of a custom add-on and it doesn't enable IPTV Simple Client

Tried;
xbmc.getCondVisibility(System.HasAddon(pvr.iptvsimple))
Reply
#4
(2016-04-28, 17:02)FresnoTV Wrote: Thanks for the reply pkscount, but I've tried with no success for pvr.iptvsimple

I've put it in a default.py of a custom add-on and it doesn't enable IPTV Simple Client

Tried;
xbmc.getCondVisibility(System.HasAddon(pvr.iptvsimple))

Sorry, I think I misunderstood. I thought you wanted to know if the add-on was actually installed, not enable it. I don't know of any way to enable an add-on programatically.
Reply
#5
oh ok, no problem, well I appreciate the help. If anyone knows how to enable the pvr addon programmatically please let us know.
Reply
#6
(2016-04-29, 18:01)FresnoTV Wrote: oh ok, no problem, well I appreciate the help. If anyone knows how to enable the pvr addon programmatically please let us know.

This post might be what you're looking for: http://forum.kodi.tv/showthread.php?tid=...pid2166050
Reply
#7
@curti , possibly but I cant add this code through python. Do you know how to create a platform that would run the json code?
Reply
#8
You could try this:
Code:
import xbmc
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id":1, "method": "Addons.SetAddonEnabled", "params": { "addonid": "plugin.video.cbsn", "enabled": false }}')

http://mirrors.xbmc.org/docs/python-docs...uteJSONRPC
Reply
#9
So far I've tried it all, thru json python and it seems like the only thing left it to modify The or if you wanna wait I'm making a script that enables the pvr management then uses actions to enable the pvr client, it works ATM but there are still a few bugs. I'm not sire on what the protocols are here so I don't know if I can give you a link or nor. But I can tell you how I did it. I enabled the pvr management system as a whole not a client through json rpc. You can can send commends with rpc through either a urllib query or you can simple use the xbmc python module http://mirrors.kodi.tv/docs/python-docs/...uteJSONRPC. Btw there is another wat to start pvr manager but during my time of making this script I found that it worked in 90% of situations. Anyway, after that I set a service to activate when a setting is enabled but you could easily use something like a skinstring to set the conditions for the script to be active. And I used execute built in with the action function, set the appropriate action ids and spaced them out accordinly and viola
Reply
#10
(2017-01-08, 15:45)Demonstratorz Wrote: So far I've tried it all, thru json python and it seems like the only thing left it to modify The or if you wanna wait I'm making a script that enables the pvr management then uses actions to enable the pvr client, it works ATM but there are still a few bugs. I'm not sire on what the protocols are here so I don't know if I can give you a link or nor. But I can tell you how I did it. I enabled the pvr management system as a whole not a client through json rpc. You can can send commends with rpc through either a urllib query or you can simple use the xbmc python module http://mirrors.kodi.tv/docs/python-docs/...uteJSONRPC. Btw there is another wat to start pvr manager but during my time of making this script I found that it worked in 90% of situations. Anyway, after that I set a service to activate when a setting is enabled but you could easily use something like a skinstring to set the conditions for the script to be active. And I used execute built in with the action function, set the appropriate action ids and spaced them out accordinly with xbmc. Sleep and voicla. But pretty soon here I'm going to send clicks instead
Reply

Logout Mark Read Team Forum Stats Members Help
how does kodi communicate the enabled status?0