don't need to decode string

This commit is contained in:
Rob Weber 2019-08-28 14:54:31 -05:00
parent 9f570233d9
commit a1c0c0bbfe

View File

@ -588,20 +588,11 @@ class FileManager:
self.excludeFile(xbmc.translatePath(dirMeta['path'])) self.excludeFile(xbmc.translatePath(dirMeta['path']))
def addFile(self,filename): def addFile(self,filename):
try:
filename = filename.decode('UTF-8')
except UnicodeDecodeError:
filename = filename.decode('ISO-8859-2')
#write the full remote path name of this file #write the full remote path name of this file
utils.log("Add File: " + filename,xbmc.LOGDEBUG) utils.log("Add File: " + filename)
self.fileArray.append(filename) self.fileArray.append(filename)
def excludeFile(self,filename): def excludeFile(self,filename):
try:
filename = filename.decode('UTF-8')
except UnicodeDecodeError:
filename = filename.decode('ISO-8859-2')
#remove trailing slash #remove trailing slash
if(filename[-1] == '/' or filename[-1] == '\\'): if(filename[-1] == '/' or filename[-1] == '\\'):