mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-14 20:35:48 +01:00
added ability to type a remote path as well as browse to one
check remote paths before writing to them
This commit is contained in:
parent
0b0d8dab3f
commit
59896ac0bf
@ -5,7 +5,7 @@ I've had to recover my database, thumbnails, and source configuration enough tim
|
||||
|
||||
Usage:
|
||||
|
||||
In the addon settings you can define a remote path for the destination of your xbmc files. You must also include a backup folder name, all of your files will be in this folder once the backup runs.
|
||||
In the addon settings you can define a remote path for the destination of your xbmc files. You must also include a backup folder name, all of your files will be in this folder once the backup runs. Please note that the typed path will supercede the browsed path - only one will be used.
|
||||
|
||||
On the Backup Selection page you can select which items from your user profile folder will be sent to the backup location. By default all are turned on except the Addon Data directory.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="script.xbmcbackup"
|
||||
name="XBMC Backup" version="0.0.4" provider-name="robweber">
|
||||
name="XBMC Backup" version="0.0.5" provider-name="robweber">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.0"/>
|
||||
</requires>
|
||||
@ -8,7 +8,7 @@
|
||||
<provides>executable</provides>
|
||||
</extension>
|
||||
<extension point="xbmc.addon.metadata">
|
||||
<summary lang="en">Backup abd restore your XBMC database and configuration files in the event of a crash or file corruption.</summary>
|
||||
<summary lang="en">Backup and restore your XBMC database and configuration files in the event of a crash or file corruption.</summary>
|
||||
<description lang="en">Ever hosed your XBMC configuration and wished you'd had a backup? Now you can with one easy click. You can export your database, playlist, thumbnails, addons and other configuration details to any source writeable by XBMC.</description>
|
||||
<platform>all</platform>
|
||||
</extension>
|
||||
|
12
default.py
12
default.py
@ -94,8 +94,16 @@ class XbmcBackup:
|
||||
def __init__(self):
|
||||
self.local_path = xbmc.translatePath("special://home")
|
||||
|
||||
if(self.Addon.getSetting('remote_path') != '' and self.Addon.getSetting("backup_name") != ''):
|
||||
self.remote_path = self.Addon.getSetting("remote_path") + self.Addon.getSetting('backup_name') + "/"
|
||||
if(self.Addon.getSetting('remote_path_2') != '' and xbmcvfs.exists(self.Addon.getSetting('remote_path_2'))):
|
||||
self.remote_path = self.Addon.getSetting('remote_path_2')
|
||||
self.Addon.setSetting("remote_path","")
|
||||
elif(self.Addon.getSetting('remote_path') != '' and xbmcvfs.exists(self.Addon.getSetting("remote_path"))):
|
||||
self.remote_path = self.Addon.getSetting("remote_path")
|
||||
|
||||
if(self.Addon.getSetting("backup_name") != ''):
|
||||
self.remote_path = self.remote_path + self.Addon.getSetting("backup_name") + "/"
|
||||
else:
|
||||
self.remote_path = ""
|
||||
|
||||
self.fileManager = FileManager(self.Addon.getAddonInfo('profile'))
|
||||
|
||||
|
@ -4,10 +4,11 @@
|
||||
<string id="30011">General</string>
|
||||
<string id="30012">File Selection</string>
|
||||
|
||||
<string id="30020">Remote Path</string>
|
||||
<string id="30020">Browse Remote Path</string>
|
||||
<string id="30021">Backup Folder Name</string>
|
||||
<string id="30022">Run Silent</string>
|
||||
<string id="30023">Mode</string>
|
||||
<string id="30024">Type Remote Path</string>
|
||||
|
||||
<string id="30030">User Addons</string>
|
||||
<string id="30031">Addon Data</string>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<category id="general" label="30011">
|
||||
<setting id="addon_mode" type="enum" values="Backup|Restore" default="Backup" label="30023" />
|
||||
<setting id="remote_path" type="folder" label="30020" />
|
||||
<setting id="remote_path_2" type="text" label="30024" default="" />
|
||||
<setting id="backup_name" type="text" label="30021" default="xbmc_backup"/>
|
||||
<setting id="run_silent" type="bool" label="30022" default="false" />
|
||||
</category>
|
||||
|
Loading…
Reference in New Issue
Block a user