The branch, eden has been updated
via c7fe3ee8c47919c00d8d7d0f0703f35e6a28c8d1 (commit)
from 7bac2f087f6a2dcc3c5c90e9fc16aa650f6ec468 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=c7fe3ee8c47919c00d8d7d0f0703f35e6a28c8d1
commit c7fe3ee8c47919c00d8d7d0f0703f35e6a28c8d1
Author: Martijn Kaijser <[email protected]>
Date: Tue Jul 24 20:03:15 2012 +0200
[script.xbmcbackup] -v0.1.0
diff --git a/script.xbmcbackup/addon.xml b/script.xbmcbackup/addon.xml
index 418dcde..9912d6d 100644
--- a/script.xbmcbackup/addon.xml
+++ b/script.xbmcbackup/addon.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.xbmcbackup"
- name="XBMC Backup" version="0.0.8" provider-name="robweber">
+ name="XBMC Backup" version="0.1.0" provider-name="robweber">
<requires>
<import addon="xbmc.python" version="2.0"/>
</requires>
diff --git a/script.xbmcbackup/changelog.txt b/script.xbmcbackup/changelog.txt
index 175e091..33440d2 100644
--- a/script.xbmcbackup/changelog.txt
+++ b/script.xbmcbackup/changelog.txt
@@ -27,3 +27,13 @@ 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
+
+[b]Version 0.0.9 [/b]
+
+modified vfs.py again to filter out xsp files (smart playlists). Created
running list for these types of compressed files
+
+added enable/disable logging toggle in settings
+
+[b]Version 0.1.0[/b]
+
+removed transparency from icon.png
diff --git a/script.xbmcbackup/default.py b/script.xbmcbackup/default.py
index 2fdc3ce..9cff77f 100644
--- a/script.xbmcbackup/default.py
+++ b/script.xbmcbackup/default.py
@@ -8,7 +8,8 @@ class FileManager:
walk_path = ''
addonDir = ''
fileArray = None
-
+ verbose_log = False
+
def __init__(self,path,addon_dir):
self.walk_path = path
self.addonDir = addon_dir
@@ -19,7 +20,8 @@ class FileManager:
def createFileList(self,Addon):
self.fileArray = []
-
+ self.verbose_log = Addon.getSetting("verbose_log") == 'true'
+
#figure out which syncing options to run
if(Addon.getSetting('backup_addons') == 'true'):
self.addFile("-addons")
@@ -53,7 +55,6 @@ class FileManager:
#this part is an oddity
configFiles = vfs.listdir(self.walk_path +
"userdata/",extra_metadata=True)
for aFile in configFiles:
- xbmc.log(aFile['file'][len(self.walk_path):])
if(aFile['file'].endswith(".xml")):
self.addFile(aFile['file'][len(self.walk_path):])
@@ -70,6 +71,8 @@ class FileManager:
def addFile(self,filename):
#write the full remote path name of this file
+ if(self.verbose_log):
+ xbmc.log("Add File: " + filename)
self.fileArray.append(filename)
def getFileList(self):
@@ -129,7 +132,8 @@ class XbmcBackup:
#make the remote directory
vfs.mkdir(self.remote_path)
-
+
+ self.log("Creating Files List")
self.fileManager.createFileList(self.Addon)
allFiles = self.fileManager.getFileList()
@@ -139,7 +143,8 @@ class XbmcBackup:
def restoreFiles(self):
self.fileManager.createFileList(self.Addon)
-
+
+ self.log("Creating Files List")
allFiles = self.fileManager.getFileList()
#write list from remote to local
@@ -149,12 +154,14 @@ class XbmcBackup:
xbmc.executebuiltin('UpdateLocalAddons')
def writeFiles(self,fileList,source,dest):
+ self.log("Writing files to: " + dest)
self.filesTotal = len(fileList)
self.filesLeft = self.filesTotal
#write each file from source to destination
for aFile in fileList:
if(not self.checkCancel()):
+ xbmc.log('Writing file: ' + source + aFile,
level=xbmc.LOGDEBUG)
self.updateProgress(aFile)
if (aFile.startswith("-")):
vfs.mkdir(dest + aFile[1:])
diff --git a/script.xbmcbackup/icon.png b/script.xbmcbackup/icon.png
index a20d02d..824b86b 100644
Binary files a/script.xbmcbackup/icon.png and b/script.xbmcbackup/icon.png
differ
diff --git a/script.xbmcbackup/resources/language/English/strings.xml
b/script.xbmcbackup/resources/language/English/strings.xml
index 75e1818..ac91e1c 100644
--- a/script.xbmcbackup/resources/language/English/strings.xml
+++ b/script.xbmcbackup/resources/language/English/strings.xml
@@ -10,6 +10,7 @@
<string id="30023">Mode</string>
<string id="30024">Type Remote Path</string>
<string id="30025">Remote Path Type</string>
+ <string id="30026">Verbose Logging</string>
<string id="30030">User Addons</string>
<string id="30031">Addon Data</string>
diff --git a/script.xbmcbackup/resources/lib/vfs.py
b/script.xbmcbackup/resources/lib/vfs.py
index 3aa291d..0b04992 100644
--- a/script.xbmcbackup/resources/lib/vfs.py
+++ b/script.xbmcbackup/resources/lib/vfs.py
@@ -38,6 +38,8 @@ def walk(path):
current_depth = 0
+ not_dir = ['.zip','.xsp','.rar']
+
while True:
if current_depth > -1:
@@ -48,8 +50,10 @@ def walk(path):
current_dirs, current_files = [], []
for x in listdir(current_path, extra_metadata=True):
+
+ file_ext = x['file'].split('.')[-1]
- if x['filetype'] == 'directory' and not
x['file'].startswith("zip://"):
+ if x['filetype'] == 'directory' and not any(file_ext in s
for s in not_dir):
current_dirs.append(urllib.unquote(x['file']))
diff --git a/script.xbmcbackup/resources/settings.xml
b/script.xbmcbackup/resources/settings.xml
index 38be3c6..555c4ee 100644
--- a/script.xbmcbackup/resources/settings.xml
+++ b/script.xbmcbackup/resources/settings.xml
@@ -7,6 +7,7 @@
<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="run_silent" type="bool" label="30022"
default="false" />
+ <setting id="verbose_log" type="bool" label="30026"
default="false" />
</category>
<category id="selection" label="30012">
<setting id="backup_addons" type="bool" label="30030"
default="true" />
-----------------------------------------------------------------------
Summary of changes:
script.xbmcbackup/addon.xml | 2 +-
script.xbmcbackup/changelog.txt | 10 ++++++++++
script.xbmcbackup/default.py | 17 ++++++++++++-----
script.xbmcbackup/icon.png | Bin 53694 -> 43609 bytes
.../resources/language/English/strings.xml | 1 +
script.xbmcbackup/resources/lib/vfs.py | 6 +++++-
script.xbmcbackup/resources/settings.xml | 1 +
7 files changed, 30 insertions(+), 7 deletions(-)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons