summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-10-08 14:17:23 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-10-08 14:17:23 +0200
commitfc0bb124f1fdbae80fe23e77ecb8fb52ad9a9b3b (patch)
treed8b03fe410be72057d281719dba74217b210fd33
parentzippyshare fix (diff)
downloadpyload-fc0bb124f1fdbae80fe23e77ecb8fb52ad9a9b3b.tar.xz
closed #82
-rw-r--r--module/PluginThread.py16
-rw-r--r--module/gui/CaptchaDock.py1
-rwxr-xr-xpyLoadGui.py4
3 files changed, 14 insertions, 7 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py
index 6d3dd55e2..ed289a591 100644
--- a/module/PluginThread.py
+++ b/module/PluginThread.py
@@ -309,6 +309,7 @@ class DecrypterThread(PluginThread):
"""run method"""
pyfile = self.active
+ retry = False
try:
self.m.log.info(_("Decrypting starts: %s") % self.active.name)
@@ -336,7 +337,8 @@ class DecrypterThread(PluginThread):
except Retry:
self.m.log.info(_("Retrying %s") % self.active.name)
- return self.active.plugin.preprocessing(self)
+ retry = True
+ return self.run()
except Exception, e:
@@ -352,10 +354,11 @@ class DecrypterThread(PluginThread):
finally:
- self.active.release()
- self.active = False
- self.m.core.files.save()
- self.m.localThreads.remove(self)
+ if not retry:
+ self.active.release()
+ self.active = False
+ self.m.core.files.save()
+ self.m.localThreads.remove(self)
#self.m.core.hookManager.downloadFinished(pyfile)
@@ -363,7 +366,8 @@ class DecrypterThread(PluginThread):
#self.m.localThreads.remove(self)
#self.active.finishIfDone()
- pyfile.delete()
+ if not retry:
+ pyfile.delete()
########################################################################
class HookThread(PluginThread):
diff --git a/module/gui/CaptchaDock.py b/module/gui/CaptchaDock.py
index 4f3c9efd0..ad61ae4f5 100644
--- a/module/gui/CaptchaDock.py
+++ b/module/gui/CaptchaDock.py
@@ -74,6 +74,7 @@ class CaptchaDockWidget(QWidget):
pixmap = QPixmap()
pixmap.loadFromData(data)
self.emit(SIGNAL("setPixmap(const QPixmap &)"), pixmap)
+ self.input.setFocus(Qt.OtherFocusReason)
def slotSubmit(self):
text = self.input.text()
diff --git a/pyLoadGui.py b/pyLoadGui.py
index 85acc0682..994e1dfb3 100755
--- a/pyLoadGui.py
+++ b/pyLoadGui.py
@@ -622,8 +622,10 @@ class main(QObject):
def checkCaptcha(self):
if self.connector.captchaWaiting() and self.mainWindow.captchaDock.isFree():
cid, img, imgType = self.connector.getCaptcha()
- self.mainWindow.captchaDock.emit(SIGNAL("setTask"), cid, str(img), imgType)
self.mainWindow.show()
+ self.mainWindow.raise_()
+ self.mainWindow.activateWindow()
+ self.mainWindow.captchaDock.emit(SIGNAL("setTask"), cid, str(img), imgType)
elif not self.mainWindow.captchaDock.isFree():
status = self.connector.getCaptchaStatus(self.mainWindow.captchaDock.currentID)
if not (status == "user" or status == "shared-user"):