Kodi Community Forum

Full Version: Ìs 'System.hasAddon' working properly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Some addon-authors are using a structure like this for e.g. video-addons: 
plugin.video.nameofauthor.firstaddon
plugin.video.nameofauthor.secondaddon
plugin.video.nameofauthor.thirdaddon


I am trying to verify if one of these addons is installed by using
System.hasAddon(plugin.video.nameofauthor.firstaddon)
but it doesn't work, whereas the syntax works in case of e.g. 
System.hasAddon(plugin.video.anotheraddon)

System.AddonIcon(plugin.video.nameofauthor.firstaddon) does not seem to work neither. 

Can anyone confirm this behaviour?
i can't reproduce..
python:
xbmc.getCondVisibility('System.HasAddon(plugin.video.foo.bar)')
works ok here.
Thank you for verifiying this issue. 

I create a static list with the following item: 
                    <item id="24">
                        <description>Welt der Wunder</description>
                        <label>Welt der Wunder</label>
                        <label2></label2>
                        <icon>$INFO[System.AddonIcon(plugin.video.L0RE.weltderwunder)]</icon>
                        <onclick>Dialog.Close(all)</onclick>
                        <onclick>RunAddon(plugin.video.L0RE.weltderwunder)</onclick>
                        <!-- <visible>System.hasAddon(plugin.video.L0RE.weltderwunder)</visible> -->
                    </item>

As soon as I remove the comment from the penultimate line, no entry is shown any longer, something what is working well for other addons like e.g.
                    <item id="133">
                        <description>CNN</description>
                        <label>CNN</label>
                        <label2></label2>
                        <icon>$INFO[System.AddonIcon(plugin.video.cnn)]</icon>
                        <onclick>Dialog.Close(all)</onclick>
                        <onclick condition="System.hasAddon(plugin.video.cnn)">RunAddon(plugin.video.cnn)</onclick>
                        <visible>System.hasAddon(plugin.video.cnn)</visible>
                    </item>


(I just noticed that this belongs to the skinning-section, not to 'Add-ons', maybe one of the mods could move it, although this shouldn't lead to any changes)

(Yes, the second character of L0RE is indeed the number 'zero' not a capital 'O', I already considered this)
ok, that i can reproduce..
looks like it has something to do with the use of capitals in the addon name.

according to our docs the addon folder / addon id MUST be in lowercase only:
https://kodi.wiki/view/Add-on_structure#Directory_Name
https://kodi.wiki/view/Addon.xml#id_attribute
You're right, changing addon names to lowercase letters solves the issue.