import xbmc
import xbmcaddon
    
__addon_id__= 'service.libraryautoupdate'
__Addon = xbmcaddon.Addon(__addon_id__)

def data_dir():
    return __Addon.getAddonInfo('profile')

def addon_dir():
    return __Addon.getAddonInfo('path')

def log(message,loglevel=xbmc.LOGNOTICE):
    xbmc.log(encode(__addon_id__ + "-" + __Addon.getAddonInfo('version') + " : " + message),level=loglevel)

def showNotification(title,message):
    xbmc.executebuiltin("Notification(" + encode(title) + "," + encode(message) + ",4000," + xbmc.translatePath(__Addon.getAddonInfo('path') + "/resources/images/clock.png") + ")")

def setSetting(name,value):
    __Addon.setSetting(name,value)

def getSetting(name):
    return __Addon.getSetting(name)
    
def getString(string_id):
    return __Addon.getLocalizedString(string_id)

def encode(string):
    return string.encode('UTF-8','replace')

@@ -5,16 +5,31 @@
 rt xbmc%0A
+import xbmcgui%0A
 import x
@@ -443,26 +443,22 @@
 xbmc
-.executebuiltin(%22N
+gui.Dialog().n
 otif
@@ -469,63 +469,64 @@
 ion(
-%22 + 
 encode(
-title) + %22,%22 + encode(message) + %22,4000,%22 + 
+getString(30010)),encode(message),time=4000,icon=
 xbmc
@@ -577,42 +577,18 @@
 + %22/
-resources/images/clock.png%22) + %22)%22
+icon.png%22)
 )%0A%0Ad

use xbmcgui.notification() part of #19