diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-11 18:42:23 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-11 18:42:23 +0100 |
commit | 7dacdd1a89dc6a6d191495937d4193172cdfa14d (patch) | |
tree | 990da5c6e116088f8841950adda112c0649781fd /module | |
parent | premium4.me error handling (diff) | |
download | pyload-7dacdd1a89dc6a6d191495937d4193172cdfa14d.tar.xz |
Unrar fix
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 12 | ||||
-rw-r--r-- | module/plugins/internal/UnRar.py | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index 82e9c1d36..b7960620d 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -25,7 +25,8 @@ if sys.version_info < (2, 7) and os.name != "nt": continue raise - def wait(self): + # unsued timeout option for older python version + def wait(self, timeout=0): """Wait for child process to terminate. Returns returncode attribute.""" if self.returncode is None: @@ -57,7 +58,7 @@ class ExtractArchive(Hook): Provides: unrarFinished (folder, filename) """ __name__ = "ExtractArchive" - __version__ = "0.1" + __version__ = "0.11" __description__ = "Extract different kind of archives" __config__ = [("activated", "bool", "Activated", True), ("fullpath", "bool", "Extract full path", True), @@ -66,7 +67,8 @@ class ExtractArchive(Hook): ("deletearchive", "bool", "Delete archives when done", False), ("subfolder", "bool", "Create subfolder for each package", False), ("destination", "folder", "Extract files to", ""), - ("queue", "bool", "Wait for all downloads to be fninished", True), + ("recursive", "bool", "Extract archives in archvies", True), + ("queue", "bool", "Wait for all downloads to be finished", True), ("renice", "int", "CPU Priority", 0), ] __author_name__ = ("pyload Team") __author_mail__ = ("admin<at>pyload.org") @@ -185,7 +187,7 @@ class ExtractArchive(Hook): if not exists(file): self.logDebug("new file %s does not exists" % file) continue - if isfile(file): + if self.getConfig("recursive") and isfile(file): new_files_ids.append((file, fid)) #append as new target files_ids = new_files_ids # also check extracted files @@ -304,4 +306,4 @@ class ExtractArchive(Hook): gid = getgrnam(self.config["permission"]["group"])[2] chown(f, uid, gid) except Exception, e: - self.log.warning(_("Setting User and Group failed"), e)
\ No newline at end of file + self.log.warning(_("Setting User and Group failed"), e) diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py index feac4c176..de6215704 100644 --- a/module/plugins/internal/UnRar.py +++ b/module/plugins/internal/UnRar.py @@ -188,4 +188,4 @@ def renice(pid, value): try: Popen(["renice", str(value), str(pid)], stdout=PIPE, stderr=PIPE, bufsize=-1) except: - print "Renice failed"
\ No newline at end of file + print "Renice failed" |