diff --git a/default.py b/default.py index e019525..9cff77f 100644 --- a/default.py +++ b/default.py @@ -8,7 +8,8 @@ class FileManager: walk_path = '' addonDir = '' fileArray = None - + verbose_log = False + def __init__(self,path,addon_dir): self.walk_path = path self.addonDir = addon_dir @@ -19,7 +20,8 @@ class FileManager: def createFileList(self,Addon): self.fileArray = [] - + self.verbose_log = Addon.getSetting("verbose_log") == 'true' + #figure out which syncing options to run if(Addon.getSetting('backup_addons') == 'true'): self.addFile("-addons") @@ -69,6 +71,8 @@ class FileManager: def addFile(self,filename): #write the full remote path name of this file + if(self.verbose_log): + xbmc.log("Add File: " + filename) self.fileArray.append(filename) def getFileList(self): diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml index 75e1818..ac91e1c 100644 --- a/resources/language/English/strings.xml +++ b/resources/language/English/strings.xml @@ -10,6 +10,7 @@ Mode Type Remote Path Remote Path Type + Verbose Logging User Addons Addon Data diff --git a/resources/lib/vfs.py b/resources/lib/vfs.py index 3aa291d..0b04992 100644 --- a/resources/lib/vfs.py +++ b/resources/lib/vfs.py @@ -38,6 +38,8 @@ def walk(path): current_depth = 0 + not_dir = ['.zip','.xsp','.rar'] + while True: if current_depth > -1: @@ -48,8 +50,10 @@ def walk(path): current_dirs, current_files = [], [] for x in listdir(current_path, extra_metadata=True): + + file_ext = x['file'].split('.')[-1] - if x['filetype'] == 'directory' and not x['file'].startswith("zip://"): + if x['filetype'] == 'directory' and not any(file_ext in s for s in not_dir): current_dirs.append(urllib.unquote(x['file'])) diff --git a/resources/settings.xml b/resources/settings.xml index 38be3c6..555c4ee 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -7,6 +7,7 @@ +