if in advanced mode allow jumping to editor from launch screen

This commit is contained in:
Rob Weber 2019-08-22 13:01:02 -05:00
parent 76c2fdc0c2
commit 061fd3efed

View File

@ -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):