mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-15 04:45:49 +01:00
0150e6a277
pulled XbmcBackup class into separate library
22 lines
525 B
Python
22 lines
525 B
Python
import xbmc
|
|
import xbmcaddon
|
|
|
|
__addon_id__= 'script.xbmcbackup'
|
|
__Addon = xbmcaddon.Addon(__addon_id__)
|
|
|
|
#global functions for logging and encoding
|
|
def log(message,loglevel=xbmc.LOGNOTICE):
|
|
xbmc.log(encode(__addon_id__ + ": " + message),level=loglevel)
|
|
|
|
def getSetting(name):
|
|
return __Addon.getSetting(name)
|
|
|
|
def setSetting(name,value):
|
|
__Addon.setSetting(name,value)
|
|
|
|
def getString(string_id):
|
|
return __Addon.getLocalizedString(string_id)
|
|
|
|
def encode(string):
|
|
return string.encode('UTF-8','replace')
|