summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-05 01:22:30 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-05 01:22:30 +0200
commitddacaa3a6afd1a2d25845a9d6d0cfe6e4787a31f (patch)
treea035b2e13dab062309b425040c7194bd741cc5dc
parent[GoogledriveCom][OneFichierCom][UlozTo] Reset DISPOSITION to False (diff)
parentUpdate ExtractArchive.py (diff)
downloadpyload-ddacaa3a6afd1a2d25845a9d6d0cfe6e4787a31f.tar.xz
Merge pull request #1392 from GammaC0de/GammaC0de-fix-ExtractArchive
[ExtractArchive] [bug] `extractQueued` was called twice
-rw-r--r--module/plugins/hooks/ExtractArchive.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index 5b90b28fc..07a2ba228 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -187,6 +187,11 @@ class ExtractArchive(Hook):
@threaded
def extractQueued(self, thread):
+ if self.extracting: #@NOTE: doing the check here for safty (called by coreReady)
+ return
+
+ self.extracting = True
+
packages = self.queue.get()
while packages:
if self.lastPackage: #: called from allDownloadsProcessed
@@ -200,6 +205,8 @@ class ExtractArchive(Hook):
packages = self.queue.get() #: check for packages added during extraction
+ self.extracting = False
+
@Expose
def extractPackage(self, *ids):
@@ -222,7 +229,7 @@ class ExtractArchive(Hook):
def allDownloadsProcessed(self):
self.lastPackage = True
- if not self.extracting:
+ if self.getConfig('waitall') and not self.extracting:
self.extractQueued()
@@ -231,8 +238,6 @@ class ExtractArchive(Hook):
if not ids:
return False
- self.extracting = True
-
processed = []
extracted = []
failed = []
@@ -374,7 +379,6 @@ class ExtractArchive(Hook):
self.queue.remove(pid)
- self.extracting = False
return True if not failed else False