summaryrefslogtreecommitdiffstats
path: root/module/PluginThread.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-11-05 16:45:06 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-11-05 16:45:06 +0100
commit1d74a9dcb91d16929a65a24d81ec441874ce4976 (patch)
treedba60b1a47ec4bf3a61e863f9102ec5b57296568 /module/PluginThread.py
parentsmall fixes: progess view in gui,xdcc,shareonline (diff)
downloadpyload-1d74a9dcb91d16929a65a24d81ec441874ce4976.tar.xz
sj fix
Diffstat (limited to 'module/PluginThread.py')
-rw-r--r--module/PluginThread.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py
index 20cb10a5b..f12639719 100644
--- a/module/PluginThread.py
+++ b/module/PluginThread.py
@@ -308,7 +308,12 @@ class DecrypterThread(PluginThread):
pyfile = self.active
retry = False
-
+
+ if not self.active.plugin.multiDL:
+ while self.m.isOccupiedCrypter(self.active.pluginname):
+ sleep(0.5)
+ self.m.addOccupiedCrypter(self.active.pluginname)
+
try:
self.m.log.info(_("Decrypting starts: %s") % self.active.name)
self.active.plugin.preprocessing(self)
@@ -343,6 +348,8 @@ class DecrypterThread(PluginThread):
self.m.log.info(_("Retrying %s") % self.active.name)
retry = True
+ if not self.active.plugin.multiDL:
+ self.m.removeOccupiedCrypter(pyfile.pluginname)
return self.run()
except Exception, e:
@@ -360,6 +367,8 @@ class DecrypterThread(PluginThread):
finally:
if not retry:
+ if not self.active.plugin.multiDL:
+ self.m.removeOccupiedCrypter(pyfile.pluginname)
self.active.release()
self.active = False
self.m.core.files.save()