TVDB are updating their site. Their site currently has a number of bugs that have broken the TVDB scraper and any add-on that relies on TVDB data. TVDB are working to rectify the problems.

Ìs 'System.hasAddon' working properly
#1
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?
Reply
#2
@ronie ?
Reply
#3
i can't reproduce..
xbmc.getCondVisibility('System.HasAddon(plugin.video.foo.bar)')
works ok here.
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.
Reply
#4
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)
Reply
#5
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
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.
Reply
#6
You're right, changing addon names to lowercase letters solves the issue.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Ìs 'System.hasAddon' working properly00