From 8d66fa6a9f1a41ffbddd746d14f6ff5bb161a896 Mon Sep 17 00:00:00 2001 From: Rob Weber Date: Wed, 27 Nov 2019 14:24:35 -0600 Subject: [PATCH] part of #159 - this will get rid of the most significant logging and keep the essentials --- resources/lib/backup.py | 13 +++++++++---- resources/settings.xml | 4 +++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/resources/lib/backup.py b/resources/lib/backup.py index 77fd8de..e2d5869 100644 --- a/resources/lib/backup.py +++ b/resources/lib/backup.py @@ -387,7 +387,9 @@ class XbmcBackup: for aFile in fileList: if(not self.progressBar.checkCancel()): - utils.log('Writing file: ' + aFile, xbmc.LOGDEBUG) + if(utils.getSettingBool('verbose_logging')): + utils.log('Writing file: ' + aFile) + if(aFile.startswith("-")): self._updateProgress(aFile[len(source.root_path) + 1:]) dest.mkdir(dest.root_path + aFile[len(source.root_path) + 1:]) @@ -552,7 +554,9 @@ class FileManager: self.walkTree(xbmc.translatePath(aDir['path']), aDir['recurse']) def walkTree(self, directory, recurse=True): - utils.log('walking ' + directory + ', recurse: ' + str(recurse)) + if(utils.getSettingBool('verbose_logging')): + utils.log('walking ' + directory + ', recurse: ' + str(recurse)) + if(directory[-1:] == '/' or directory[-1:] == '\\'): directory = directory[:-1] @@ -593,11 +597,12 @@ class FileManager: def addFile(self, filename): # write the full remote path name of this file - utils.log("Add File: " + filename) + if(utils.getSettingBool('verbose_logging')): + utils.log("Add File: " + filename) + self.fileArray.append(filename) def excludeFile(self, filename): - # remove trailing slash if(filename[-1] == '/' or filename[-1] == '\\'): filename = filename[:-1] diff --git a/resources/settings.xml b/resources/settings.xml index 12189a7..7e19f0c 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -1,9 +1,11 @@ - + + +