mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-14 04:15:49 +01:00
fixes #200
This commit is contained in:
parent
4c99f43340
commit
696e0773c3
19
default.py
19
default.py
@ -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']))
|
||||
|
@ -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 ""
|
||||
|
Loading…
Reference in New Issue
Block a user