mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-14 20:35:48 +01:00
added some encoding options to minimize international text from crashing addon
This commit is contained in:
parent
1e41f75df4
commit
2c2b87b861
@ -72,7 +72,7 @@ class FileManager:
|
||||
def addFile(self,filename):
|
||||
#write the full remote path name of this file
|
||||
if(self.verbose_log):
|
||||
xbmc.log("Add File: " + filename)
|
||||
xbmc.log("Add File: " + filename.encode("utf-8"))
|
||||
self.fileArray.append(filename)
|
||||
|
||||
def getFileList(self):
|
||||
@ -93,10 +93,9 @@ class XbmcBackup:
|
||||
fileManager = None
|
||||
|
||||
def __init__(self):
|
||||
self.local_path = xbmc.translatePath("special://home")
|
||||
self.local_path = xbmc.translatePath("special://home").encode("utf-8");
|
||||
|
||||
if(self.Addon.getSetting('remote_selection') == '1' and vfs.exists(self.Addon.getSetting('remote_path_2'))):
|
||||
xbmc.log(str(self.Addon.getSetting('remote_path_2')))
|
||||
self.remote_path = self.Addon.getSetting('remote_path_2')
|
||||
self.Addon.setSetting("remote_path","")
|
||||
elif(self.Addon.getSetting('remote_selection') == '0' and vfs.exists(self.Addon.getSetting("remote_path"))):
|
||||
@ -107,6 +106,8 @@ class XbmcBackup:
|
||||
else:
|
||||
self.remote_path = ""
|
||||
|
||||
self.remote_path = self.remote_path.encode("utf-8");
|
||||
|
||||
self.log("Starting")
|
||||
self.log('Local Dir: ' + self.local_path)
|
||||
self.log('Remote Dir: ' + self.remote_path)
|
||||
|
Loading…
Reference in New Issue
Block a user