mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-12-22 14:05:23 +01:00
if in advanced mode allow jumping to editor from launch screen
This commit is contained in:
parent
76c2fdc0c2
commit
061fd3efed
15
default.py
15
default.py
@ -1,5 +1,5 @@
|
|||||||
import sys, urlparse
|
import sys, urlparse
|
||||||
import xbmcgui
|
import xbmc, xbmcgui
|
||||||
import resources.lib.utils as utils
|
import resources.lib.utils as utils
|
||||||
from resources.lib.backup import XbmcBackup
|
from resources.lib.backup import XbmcBackup
|
||||||
|
|
||||||
@ -28,8 +28,15 @@ if("mode" in params):
|
|||||||
|
|
||||||
#if mode wasn't passed in as arg, get from user
|
#if mode wasn't passed in as arg, get from user
|
||||||
if(mode == -1):
|
if(mode == -1):
|
||||||
|
#by default, Backup,Restore,Open Settings
|
||||||
|
options = [utils.getString(30016),utils.getString(30017),utils.getString(30099)]
|
||||||
|
|
||||||
|
#find out if we're using the advanced editor
|
||||||
|
if(int(utils.getSetting('backup_selection_type')) == 1):
|
||||||
|
options.append(utils.getString(30125))
|
||||||
|
|
||||||
#figure out if this is a backup or a restore from the user
|
#figure out if this is a backup or a restore from the user
|
||||||
mode = xbmcgui.Dialog().select(utils.getString(30010) + " - " + utils.getString(30023),[utils.getString(30016),utils.getString(30017),utils.getString(30099)])
|
mode = xbmcgui.Dialog().select(utils.getString(30010) + " - " + utils.getString(30023),options)
|
||||||
|
|
||||||
#check if program should be run
|
#check if program should be run
|
||||||
if(mode != -1):
|
if(mode != -1):
|
||||||
@ -39,7 +46,9 @@ if(mode != -1):
|
|||||||
if(mode == 2):
|
if(mode == 2):
|
||||||
#open the settings dialog
|
#open the settings dialog
|
||||||
utils.openSettings()
|
utils.openSettings()
|
||||||
|
elif(mode == 3 and int(utils.getSetting('backup_selection_type')) == 1):
|
||||||
|
#open the advanced editor
|
||||||
|
xbmc.executebuiltin('RunScript(special://home/addons/script.xbmcbackup/launcher.py,action=advanced_editor)')
|
||||||
elif(backup.remoteConfigured()):
|
elif(backup.remoteConfigured()):
|
||||||
|
|
||||||
if(mode == backup.Restore):
|
if(mode == backup.Restore):
|
||||||
|
Loading…
Reference in New Issue
Block a user