This commit is contained in:
Rob Weber 2021-07-06 09:01:14 -05:00
parent 4c99f43340
commit 696e0773c3
2 changed files with 15 additions and 8 deletions

View File

@ -75,9 +75,8 @@ if(mode == -1):
# figure out if this is a backup or a restore from the user
mode = xbmcgui.Dialog().select(utils.getString(30010) + " - " + utils.getString(30023), options)
# check if program should be run
# check which mode should be run
if(mode != -1):
backup = XbmcBackup()
if(mode == SETTINGS):
# open the settings dialog
@ -99,9 +98,11 @@ if(mode != -1):
editor = AdvancedBackupEditor()
editor.copySimpleConfig()
elif(backup.remoteConfigured()):
elif(mode == BACKUP or mode == RESTORE):
backup = XbmcBackup()
# if mode was RESTORE
if(mode == RESTORE):
if(mode == RESTORE and backup.remoteConfigured()):
# get list of valid restore points
restorePoints = backup.listBackups()
pointNames = []
@ -133,10 +134,12 @@ if(mode != -1):
backup.restore(selectedSets=params['sets'].split('|'))
else:
backup.restore()
else:
elif(mode == BACKUP and backup.remoteConfigured()):
# mode was BACKUP
backup.backup()
else:
# can't go any further
xbmcgui.Dialog().ok(utils.getString(30010), utils.getString(30045))
utils.openSettings()
else:
# can't go any further
xbmcgui.Dialog().ok(utils.getString(30010), utils.getString(30045))
utils.openSettings()
xbmcgui.Dialog().ok(utils.getString(30010), "%s %s" % (utils.getString(30159), params['mode']))

View File

@ -617,3 +617,7 @@ msgstr ""
msgctxt "#30158"
msgid "Run backup on daily, weekly, monthly, or custom schedule"
msgstr ""
msgctxt "#30159"
msgid "Backup started with unknown mode"
msgstr ""