found old reference to os module replaced with vfs.pyo

added keymap and perperipheral_data folders to "config" area
This commit is contained in:
robweber 2012-05-25 15:57:48 -05:00
parent 842f56afd1
commit 707bd61863
3 changed files with 15 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.xbmcbackup" <addon id="script.xbmcbackup"
name="XBMC Backup" version="0.0.7" provider-name="robweber"> name="XBMC Backup" version="0.0.8" provider-name="robweber">
<requires> <requires>
<import addon="xbmc.python" version="2.0"/> <import addon="xbmc.python" version="2.0"/>
</requires> </requires>

View File

@ -23,3 +23,7 @@ File Selection is now followed for both backup and restore options
[b]Version 0.0.7[/b] [b]Version 0.0.7[/b]
removed "restore.txt" file and now write file listing to memory list instead removed "restore.txt" file and now write file listing to memory list instead
[b]Version 0.0.8[/b]
modified vfs.py script to exclude handling zip files as directories, added keymap and peripheral data folders in the "config" section

View File

@ -44,11 +44,17 @@ class FileManager:
self.walkTree(self.walk_path + "userdata/Thumbnails") self.walkTree(self.walk_path + "userdata/Thumbnails")
if(Addon.getSetting("backup_config") == "true"): if(Addon.getSetting("backup_config") == "true"):
#this one is an oddity self.addFile("-userdata/keymaps")
configFiles = os.listdir(self.walk_path + "userdata/") self.walkTree(self.walk_path + "userdata/keymaps")
self.addFile("-userdata/peripheral_data")
self.walkTree(self.walk_path + "userdata/peripheral_data")
#this part is an oddity
configFiles = vfs.listdir(self.walk_path + "userdata/",extra_metadata=True)
for aFile in configFiles: for aFile in configFiles:
if(aFile.endswith(".xml")): if(aFile['file'].endswith(".xml")):
self.addFile("userdata/" + aFile) self.addFile("userdata/" + aFile['file'])
def walkTree(self,directory): def walkTree(self,directory):
for (path, dirs, files) in vfs.walk(directory): for (path, dirs, files) in vfs.walk(directory):