summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/ExtractArchive.py
diff options
context:
space:
mode:
authorGravatar Jens Hörnlein <jens.hoernlein@googlemail.com> 2015-02-07 03:08:28 +0100
committerGravatar Jens Hörnlein <jens.hoernlein@googlemail.com> 2015-02-09 23:36:28 +0100
commitc5daf5fa18490ff5977f06416b14bf0474822974 (patch)
treed9b8104d7342c9bc0d62e64cb77488b58ff022b5 /module/plugins/hooks/ExtractArchive.py
parent[CaptchaService] Fix https://github.com/pyload/pyload/issues/1162 (diff)
downloadpyload-c5daf5fa18490ff5977f06416b14bf0474822974.tar.xz
[ExtractArchive] Fix: Show Status/Progressbar
Diffstat (limited to 'module/plugins/hooks/ExtractArchive.py')
-rw-r--r--module/plugins/hooks/ExtractArchive.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index 88036da39..81655b108 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -198,14 +198,14 @@ class ExtractArchive(Hook):
@threaded
- def allDownloadsProcessed(self):
- if self.extract(self.queue.get()): #@NOTE: check only if all gone fine, no failed reporting for now
+ def allDownloadsProcessed(self, thread):
+ if self.extract(self.queue.get(), thread): #@NOTE: check only if all gone fine, no failed reporting for now
self.manager.dispatchEvent("all_archives_extracted")
self.manager.dispatchEvent("all_archives_processed")
- def extract(self, ids):
+ def extract(self, ids, thread=None):
if not ids:
return False
@@ -302,7 +302,7 @@ class ExtractArchive(Hook):
fid)
archive.init()
- new_files = self._extract(archive, fid, pypack.password)
+ new_files = self._extract(archive, fid, pypack.password, thread)
except Exception, e:
self.logError(name, e)
@@ -348,10 +348,11 @@ class ExtractArchive(Hook):
return True if not failed else False
- def _extract(self, archive, fid, password):
+ def _extract(self, archive, fid, password, thread):
pyfile = self.core.files.getFile(fid)
name = os.path.basename(archive.filename)
+ thread.addActive(pyfile)
pyfile.setStatus("processing")
encrypted = False