mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-12-22 14:05:23 +01:00
finished the different backup selection options
This commit is contained in:
parent
3fa30e407a
commit
ee880eaedf
20
default.py
20
default.py
@ -37,7 +37,27 @@ class XbmcBackup:
|
||||
if(self.Addon.getSetting('backup_addon_data') == 'true'):
|
||||
xbmcvfs.mkdir(self.remote_path + "userdata/addon_data")
|
||||
self.walkTree(self.local_path + "userdata/addon_data/")
|
||||
|
||||
if(self.Addon.getSetting('backup_database') == 'true'):
|
||||
xbmcvfs.mkdir(self.remote_path + "userdata/Database")
|
||||
self.walkTree(self.local_path + "userdata/Database")
|
||||
|
||||
if(self.Addon.getSetting("backup_playlists") == 'true'):
|
||||
xbmcvfs.mkdir(self.remote_path + "userdata/playlists")
|
||||
self.walkTree(self.local_path + "userdata/playlists")
|
||||
|
||||
if(self.Addon.getSetting("backup_thumbnails") == "true"):
|
||||
xbmcvfs.mkdir(self.remote_path + "userdata/Thumbnails")
|
||||
self.walkTree(self.local_path + "userdata/Thumbnails")
|
||||
|
||||
if(self.Addon.getSetting("backup_config") == "true"):
|
||||
#this on is an oddity
|
||||
configFiles = os.listdir(self.local_path + "userdata/")
|
||||
for aFile in configFiles:
|
||||
if(aFile.endswith(".xml")):
|
||||
self.log("Copying: " + self.local_path + "userdata/" + aFile)
|
||||
xbmcvfs.copy(self.local_path + "userdata/" + aFile,self.remote_path + "userdata/" + aFile)
|
||||
|
||||
def walkTree(self,directory):
|
||||
for (path, dirs, files) in os.walk(directory):
|
||||
#get the relative part of this path
|
||||
|
Loading…
Reference in New Issue
Block a user