mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-14 12:25:48 +01:00
closes #218
This commit is contained in:
parent
d4240f1345
commit
4c4e4a74ab
@ -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 ""
|
||||
|
@ -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'):
|
||||
|
@ -50,6 +50,17 @@
|
||||
</constraints>
|
||||
<control type="spinner" format="string" />
|
||||
</setting>
|
||||
<!-- backup suffix -->
|
||||
<setting id="backup_suffix" type="string" label="30160" help="30161">
|
||||
<level>2</level>
|
||||
<default></default>
|
||||
<constraints>
|
||||
<allowempty>true</allowempty>
|
||||
</constraints>
|
||||
<control type="edit" format="string">
|
||||
<heading>30024</heading>
|
||||
</control>
|
||||
</setting>
|
||||
</group>
|
||||
<group id="2" label="">
|
||||
<!-- verbose logging -->
|
||||
|
Loading…
Reference in New Issue
Block a user