should encode() all strings before displaying notification fixes #33

This commit is contained in:
Rob Weber 2013-10-01 13:22:03 -05:00
parent 1a4e64572a
commit 2b14f23a1d
3 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.xbmcbackup" <addon id="script.xbmcbackup"
name="XBMC Backup" version="0.4.0" provider-name="robweber"> name="XBMC Backup" version="0.4.1" provider-name="robweber">
<requires> <requires>
<import addon="xbmc.python" version="2.1.0"/> <import addon="xbmc.python" version="2.1.0"/>
</requires> </requires>

View File

@ -1,3 +1,7 @@
Version 0.4.1
added encode() around notifications
Version 0.4.0 Version 0.4.0
fixed settings display error - thanks zer04c fixed settings display error - thanks zer04c

View File

@ -14,7 +14,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(" + getString(30010) + "," + message + ",4000," + xbmc.translatePath(__Addon.getAddonInfo('path') + "/icon.png") + ")") xbmc.executebuiltin("Notification(" + encode(getString(30010)) + "," + encode(message) + ",4000," + xbmc.translatePath(__Addon.getAddonInfo('path') + "/icon.png") + ")")
def getSetting(name): def getSetting(name):
return __Addon.getSetting(name) return __Addon.getSetting(name)