diff --git a/resources/lib/backup.py b/resources/lib/backup.py index c57f018..edb8809 100644 --- a/resources/lib/backup.py +++ b/resources/lib/backup.py @@ -121,28 +121,28 @@ class XbmcBackup: self.remote_vfs.set_root('/') def run(self,mode=-1,runSilent=False): - #check if we should use the progress bar - if(utils.getSetting('run_silent') == 'false' and not runSilent): - self.progressBar = xbmcgui.DialogProgress() - self.progressBar.create(utils.getString(30010),utils.getString(30049) + "......") - - #determine backup mode - if(mode == -1): - mode = int(utils.getSetting('addon_mode')) #append backup folder name remote_base_path = "" + progressBarTitle = utils.getString(30010) + " - " if(mode == self.Backup and self.remote_vfs.root_path != ''): #capture base path for backup rotation remote_base_path = self.remote_vfs.set_root(self.remote_vfs.root_path + time.strftime("%Y%m%d") + "/") + progressBarTitle = progressBarTitle + utils.getString(30016) elif(mode == self.Restore and utils.getSetting("backup_name") != '' and self.remote_vfs.root_path != ''): self.remote_vfs.set_root(self.remote_vfs.root_path + utils.getSetting("backup_name") + "/") + progressBarTitle = progressBarTitle + utils.getString(30017) else: self.remote_vfs = None utils.log(utils.getString(30047) + ": " + self.local_vfs.root_path) utils.log(utils.getString(30048) + ": " + self.remote_vfs.root_path) + #check if we should use the progress bar + if(utils.getSetting('run_silent') == 'false' and not runSilent): + self.progressBar = xbmcgui.DialogProgress() + self.progressBar.create(progressBarTitle,utils.getString(30049) + "......") + #run the correct mode if(mode == self.Backup): utils.log(utils.getString(30023) + " - " + utils.getString(30016))