From 061fd3efeddb0d0f80d7d938fdcd8b74fee40e7d Mon Sep 17 00:00:00 2001 From: Rob Weber Date: Thu, 22 Aug 2019 13:01:02 -0500 Subject: [PATCH] if in advanced mode allow jumping to editor from launch screen --- default.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/default.py b/default.py index c748240..04cfe04 100644 --- a/default.py +++ b/default.py @@ -1,5 +1,5 @@ import sys, urlparse -import xbmcgui +import xbmc, xbmcgui import resources.lib.utils as utils 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 == -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 - 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 if(mode != -1): @@ -39,7 +46,9 @@ if(mode != -1): if(mode == 2): #open the settings dialog 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()): if(mode == backup.Restore):