diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index 04bb526..2b1f06c 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -621,3 +621,11 @@ msgstr "" msgctxt "#30159" msgid "Backup started with unknown mode" msgstr "" + +msgctxt "#30160" +msgid "Backup Filename Suffix" +msgstr "" + +msgctxt "#30161" +msgid "Amend a string to the end of each backup folder or ZIP file" +msgstr "" diff --git a/resources/lib/backup.py b/resources/lib/backup.py index 59d89be..e7cf95d 100644 --- a/resources/lib/backup.py +++ b/resources/lib/backup.py @@ -93,7 +93,7 @@ class XbmcBackup: file_ext = aFile.split('.')[-1] folderName = aFile.split('.')[0] - if(file_ext == 'zip' and len(folderName) == 12 and folderName.isdigit()): + if(file_ext == 'zip' and len(folderName) >= 12 and folderName[0:12].isdigit()): # format the name according to regional settings and display the file size folderName = "%s - %s" % (self._dateFormat(folderName), utils.diskString(self.remote_vfs.fileSize(self.remote_base_path + aFile))) @@ -368,7 +368,7 @@ class XbmcBackup: self.saved_remote_vfs = self.remote_vfs self.remote_vfs = ZipFileSystem(zip_path, "w") - self.remote_vfs.set_root(self.remote_vfs.root_path + time.strftime("%Y%m%d%H%M") + "/") + self.remote_vfs.set_root(self.remote_vfs.root_path + time.strftime("%Y%m%d%H%M") + utils.getSetting('backup_suffix').strip() + "/") progressBarTitle = progressBarTitle + utils.getString(30023) + ": " + utils.getString(30016) elif(mode == self.Restore and self.restore_point is not None and self.remote_vfs.root_path != ''): if(self.restore_point.split('.')[-1] != 'zip'): diff --git a/resources/settings.xml b/resources/settings.xml index 410914f..3f3843f 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -50,6 +50,17 @@ + + + 2 + + + true + + + 30024 + +