mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-12-22 14:05:23 +01:00
Merge branch 'master' into gotham-dev
Conflicts: addon.xml changelog.txt resources/lib/utils.py
This commit is contained in:
commit
775a5aeda2
@ -2,12 +2,16 @@ Version 0.5.1
|
||||
|
||||
updated for new Gotham xbmc python updates
|
||||
|
||||
added version info to logs
|
||||
|
||||
Version 0.5.0
|
||||
|
||||
New Version for Gotham
|
||||
|
||||
Version 0.4.5
|
||||
|
||||
added version info to logs
|
||||
|
||||
added try/catch for unicode errors
|
||||
|
||||
Version 0.4.4
|
||||
|
||||
modified the check for invalid file types
|
||||
|
@ -15,7 +15,7 @@ def openSettings():
|
||||
__Addon.openSettings()
|
||||
|
||||
def log(message,loglevel=xbmc.LOGNOTICE):
|
||||
xbmc.log(encode(__addon_id__ + "-" + __Addon.getAddonInfo('version') + ": " + message),level=loglevel)
|
||||
xbmc.log(encode(__addon_id__ + "-" + __Addon.getAddonInfo('version') + ": " + message),level=loglevel)
|
||||
|
||||
def showNotification(message):
|
||||
xbmcgui.Dialog().notification(encode(getString(30010)),encode(message),time=4000,icon=xbmc.translatePath(__Addon.getAddonInfo('path') + "/icon.png"))
|
||||
@ -30,4 +30,11 @@ def getString(string_id):
|
||||
return __Addon.getLocalizedString(string_id)
|
||||
|
||||
def encode(string):
|
||||
return string.encode('UTF-8','replace')
|
||||
result = ''
|
||||
|
||||
try:
|
||||
result = string.encode('UTF-8','replace')
|
||||
except UnicodeDecodeError:
|
||||
result = 'Unicode Error'
|
||||
|
||||
return result
|
||||
|
Loading…
Reference in New Issue
Block a user