use xbmcgui.notification() part of #36

This commit is contained in:
Rob Weber 2014-01-20 12:48:23 -06:00
parent 987d90de12
commit e3be458a28

View File

@ -1,4 +1,5 @@
import xbmc import xbmc
import xbmcgui
import xbmcaddon import xbmcaddon
__addon_id__= 'script.xbmcbackup' __addon_id__= 'script.xbmcbackup'
@ -17,7 +18,7 @@ def log(message,loglevel=xbmc.LOGNOTICE):
xbmc.log(encode(__addon_id__ + ": " + message),level=loglevel) xbmc.log(encode(__addon_id__ + ": " + message),level=loglevel)
def showNotification(message): def showNotification(message):
xbmc.executebuiltin("Notification(" + encode(getString(30010)) + "," + encode(message) + ",4000," + xbmc.translatePath(__Addon.getAddonInfo('path') + "/icon.png") + ")") xbmcgui.Dialog().notification(encode(getString(30010)),encode(message),time=4000,icon=xbmc.translatePath(__Addon.getAddonInfo('path') + "/icon.png"))
def getSetting(name): def getSetting(name):
return __Addon.getSetting(name) return __Addon.getSetting(name)