From d9e31e32ada05195759c1c124055d6c2376c2bf6 Mon Sep 17 00:00:00 2001 From: Rob Weber Date: Fri, 21 Nov 2014 13:25:19 -0600 Subject: [PATCH] reworked strings again, insert "mode" into gui --- resources/language/English/strings.xml | 4 ++-- resources/lib/backup.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml index 07ed4f8..90762aa 100644 --- a/resources/language/English/strings.xml +++ b/resources/language/English/strings.xml @@ -8,8 +8,8 @@ General File Selection Scheduling - Running Backup - Running Restore + Backup + Restore Browse Path Type Path Browse Remote Path diff --git a/resources/lib/backup.py b/resources/lib/backup.py index 7a93024..2093df2 100644 --- a/resources/lib/backup.py +++ b/resources/lib/backup.py @@ -125,11 +125,11 @@ class XbmcBackup: self.remote_vfs = ZipFileSystem(xbmc.translatePath("special://temp/xbmc_backup_temp.zip"),"w") self.remote_vfs.set_root(self.remote_vfs.root_path + time.strftime("%Y%m%d%H%M") + "/") - progressBarTitle = progressBarTitle + utils.getString(30016) + progressBarTitle = progressBarTitle + utils.getString(30023) + ": " + utils.getString(30016) elif(mode == self.Restore and self.restore_point != None and self.remote_vfs.root_path != ''): if(self.restore_point.split('.')[-1] != 'zip'): self.remote_vfs.set_root(self.remote_vfs.root_path + self.restore_point + "/") - progressBarTitle = progressBarTitle + utils.getString(30017) + progressBarTitle = progressBarTitle + utils.getString(30023) + ": " + utils.getString(30017) else: #kill the program here self.remote_vfs = None @@ -489,10 +489,11 @@ class XbmcBackup: def _rotateBackups(self): total_backups = int(utils.getSetting('backup_rotation')) + if(total_backups > 0): #get a list of valid backup folders dirs = self.listBackups() - + if(len(dirs) > total_backups): #remove backups to equal total wanted remove_num = 0