mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-14 20:35:48 +01:00
added enum setting to make setting the remote path more understandable
This commit is contained in:
parent
f0d98152f1
commit
1d320cd601
@ -90,14 +90,15 @@ class XbmcBackup:
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.local_path = xbmc.translatePath("special://home")
|
self.local_path = xbmc.translatePath("special://home")
|
||||||
|
|
||||||
if(self.Addon.getSetting('remote_path_2') != '' and vfs.exists(self.Addon.getSetting('remote_path_2'))):
|
if(self.Addon.getSetting('remote_selection') == '1' and vfs.exists(self.Addon.getSetting('remote_path_2'))):
|
||||||
|
xbmc.log(str(self.Addon.getSetting('remote_path_2')))
|
||||||
self.remote_path = self.Addon.getSetting('remote_path_2')
|
self.remote_path = self.Addon.getSetting('remote_path_2')
|
||||||
self.Addon.setSetting("remote_path","")
|
self.Addon.setSetting("remote_path","")
|
||||||
elif(self.Addon.getSetting('remote_path') != '' and vfs.exists(self.Addon.getSetting("remote_path"))):
|
elif(self.Addon.getSetting('remote_selection') == '0' and vfs.exists(self.Addon.getSetting("remote_path"))):
|
||||||
self.remote_path = self.Addon.getSetting("remote_path")
|
self.remote_path = self.Addon.getSetting("remote_path")
|
||||||
|
|
||||||
if(self.Addon.getSetting("backup_name") != ''):
|
if(self.Addon.getSetting("backup_name") != '' and self.remote_path != ''):
|
||||||
self.remote_path = self.remote_path + self.Addon.getSetting("backup_name") + "/"
|
self.remote_path = self.remote_path + self.Addon.getSetting("backup_name") + "/"
|
||||||
else:
|
else:
|
||||||
self.remote_path = ""
|
self.remote_path = ""
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
<string id="30022">Run Silent</string>
|
<string id="30022">Run Silent</string>
|
||||||
<string id="30023">Mode</string>
|
<string id="30023">Mode</string>
|
||||||
<string id="30024">Type Remote Path</string>
|
<string id="30024">Type Remote Path</string>
|
||||||
|
<string id="30025">Remote Path Type</string>
|
||||||
|
|
||||||
<string id="30030">User Addons</string>
|
<string id="30030">User Addons</string>
|
||||||
<string id="30031">Addon Data</string>
|
<string id="30031">Addon Data</string>
|
||||||
<string id="30032">Database</string>
|
<string id="30032">Database</string>
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
<settings>
|
<settings>
|
||||||
<category id="general" label="30011">
|
<category id="general" label="30011">
|
||||||
<setting id="addon_mode" type="enum" values="Backup|Restore" default="Backup" label="30023" />
|
<setting id="addon_mode" type="enum" values="Backup|Restore" default="Backup" label="30023" />
|
||||||
<setting id="remote_path_2" type="text" label="30024" default="" />
|
<setting id="remote_selection" type="enum" values="Browse Path|Type Path" defaults="Browse Path" label="30025"/>
|
||||||
<setting id="remote_path" type="folder" label="30020" />
|
<setting id="remote_path_2" type="text" label="30024" default="" visible="eq(-1,1)" />
|
||||||
|
<setting id="remote_path" type="folder" label="30020" visible="eq(-2,0)" />
|
||||||
<setting id="backup_name" type="text" label="30021" default="xbmc_backup"/>
|
<setting id="backup_name" type="text" label="30021" default="xbmc_backup"/>
|
||||||
<setting id="run_silent" type="bool" label="30022" default="false" />
|
<setting id="run_silent" type="bool" label="30022" default="false" />
|
||||||
</category>
|
</category>
|
||||||
|
Loading…
Reference in New Issue
Block a user