diff options
author | mkaay <mkaay@mkaay.de> | 2009-12-30 12:35:03 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-12-30 12:35:03 +0100 |
commit | c1516088e4e7f76dddd68ef71f58c6413862e31c (patch) | |
tree | 9e392f79fc225934b8a0a99cc4a119332b6685e0 /module/gui/connector.py | |
parent | messed up last commit message; added new icons, default connection in gui, pu... (diff) | |
download | pyload-c1516088e4e7f76dddd68ef71f58c6413862e31c.tar.xz |
show captchas in gui, SerienjunkiesOrg plugin
Diffstat (limited to 'module/gui/connector.py')
-rw-r--r-- | module/gui/connector.py | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/module/gui/connector.py b/module/gui/connector.py index 2915cf568..432999161 100644 --- a/module/gui/connector.py +++ b/module/gui/connector.py @@ -374,7 +374,7 @@ class connector(QThread): finally: self.mutex.unlock() - def slotPullOutPackage(self, pid): + def pullOutPackage(self, pid): """ pull out package """ @@ -382,7 +382,43 @@ class connector(QThread): try: return self.proxy.pull_out_package(pid) except Exception, e: - self.emit(SIGNAL("proxy_error"), "slotPullOutPackage", e) + self.emit(SIGNAL("proxy_error"), "pullOutPackage", e) + finally: + self.mutex.unlock() + + def captchaWaiting(self): + """ + is the a captcha waiting? + """ + self.mutex.lock() + try: + return self.proxy.is_captcha_waiting() + except Exception, e: + self.emit(SIGNAL("proxy_error"), "captchaWaiting", e) + finally: + self.mutex.unlock() + + def getCaptcha(self): + """ + get captcha + """ + self.mutex.lock() + try: + return self.proxy.get_captcha_task() + except Exception, e: + self.emit(SIGNAL("proxy_error"), "getCaptcha", e) + finally: + self.mutex.unlock() + + def setCaptchaResult(self, cid, result): + """ + get captcha + """ + self.mutex.lock() + try: + return self.proxy.set_captcha_result(cid, result) + except Exception, e: + self.emit(SIGNAL("proxy_error"), "setCaptchaResult", e) finally: self.mutex.unlock() |