Kodi Community Forum
Is there a visible condition for existing addons? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Is there a visible condition for existing addons? (/showthread.php?tid=97537)



Is there a visible condition for existing addons? - igotdvds - 2011-03-23

Is there a way to use visible conditions base don whether or not an addon is installed?

Basically, I want to show something but only if the user has a particular addon installed.


- Hitcher - 2011-03-23

system.hasaddon()

ie

PHP Code:
<visible>system.hasaddon(plugin.video.apple.movie.trailers.lite)</visible



- igotdvds - 2011-03-23

Hitcher Wrote:system.hasaddon()

ie

PHP Code:
<visible>system.hasaddon(plugin.video.apple.movie.trailers.lite)</visible

Always coming through, thanks Hitcher!


- igotdvds - 2011-03-23

You couldnt possibly tell me how to disable a button (not hide it)?

Also, I dont think this is working. It always returns true.


- mcborzu - 2011-03-23

igotdvds Wrote:You couldnt possibly tell me how to disable a button (not hide it)?

Also, I dont think this is working. It always returns true.

From my tests addons installed via the repo the system.hasadoon condition works, but addons installed manually will always return true...


- Hitcher - 2011-03-23

Seems like it could be related to this -
mcborzu Wrote:Alright tried again, just want to 2x:

It seems to work only if addon is installed via addon manager correct? Thats how it's detecting whether or not something hasaddon

Like this works:


And if I uninstall the addon via addon repo then the setting disappears like expected. So far this doesn't work:


That is because I manually installed it, since the addon is not in repo yet, correct?



- igotdvds - 2011-03-23

mcborzu Wrote:From my tests addons installed via the repo the system.hasadoon condition works, but addons installed manually will always return true...

Well crap, my plan is squashed then. oh well. Sad


- branlr - 2011-03-23

Well, this seems like it should be reported as a bug, so you can always wait it out or submit a patch