Project

General

Profile

Feature #312 » test_hasaddon.py

dandar3, 26/07/2014 05:58 PM

 
import xbmc

def checkHasAddon( addon ):
result = xbmc.getCondVisibility( "System.HasAddon(%s)" % ( addon ) )
print "System.HasAddon(%s) = %r" % ( addon, bool( result ) )

checkHasAddon( "script.xbmc.subtitles" )
checkHasAddon( "special://home/scripts/XBMC Subtitles" )
checkHasAddon( "script.that.doesnt.exist" )
checkHasAddon( "special://home/scripts/One That Doesnt Exist" )
(1-1/2)