summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-05-01 20:02:26 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-05-01 20:02:26 +0200
commit93dd7baa519d15712e4c578b472e448502ec2298 (patch)
tree6980b0eb4432de2bdf72c6271bd736c6fc35e4ab /pyLoadCore.py
parentimport fix (diff)
downloadpyload-93dd7baa519d15712e4c578b472e448502ec2298.tar.xz
updated captcha manager
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index e59f8db10..16bfbbeae 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -718,16 +718,22 @@ class ServerMethods():
task = self.core.captchaManager.getTask()
return not task == None
- def get_captcha_task(self):
+ def get_captcha_task(self, exclusive=False):
+ self.core.lastGuiConnected = time.time()
task = self.core.captchaManager.getTask()
if task:
- task.setWatingForUser()
+ task.setWatingForUser(exclusive=exclusive)
c = task.getCaptcha()
return str(task.getID()), Binary(c[0]), str(c[1])
else:
return None, None, None
+ def get_task_status(self, tid):
+ self.core.lastGuiConnected = time.time()
+ return self.core.captchaManager.getTaskFromID(tid).getStatus()
+
def set_captcha_result(self, tid, result):
+ self.core.lastGuiConnected = time.time()
task = self.core.captchaManager.getTaskFromID(tid)
if task:
task.setResult(result)