summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/ExpertDecoders.py
diff options
context:
space:
mode:
authorGravatar Sahil Shekhawat <sahilshekhawat01@gmail.com> 2015-01-05 19:31:35 +0100
committerGravatar Sahil Shekhawat <sahilshekhawat01@gmail.com> 2015-01-05 19:31:35 +0100
commit7b8593899e3d37846fb3ed94d47d9daba13a02d7 (patch)
tree5427650c3dd14b0c2878a1081be3709458bf48db /module/plugins/hooks/ExpertDecoders.py
parentCreated plugin for Nitroflare.com (diff)
parentSpare code improvements (diff)
downloadpyload-7b8593899e3d37846fb3ed94d47d9daba13a02d7.tar.xz
Merge branch 'stable' of https://github.com/pyload/pyload into stable
Diffstat (limited to 'module/plugins/hooks/ExpertDecoders.py')
-rw-r--r--module/plugins/hooks/ExpertDecoders.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hooks/ExpertDecoders.py b/module/plugins/hooks/ExpertDecoders.py
index 54de8eb53..c80401003 100644
--- a/module/plugins/hooks/ExpertDecoders.py
+++ b/module/plugins/hooks/ExpertDecoders.py
@@ -4,18 +4,17 @@ from __future__ import with_statement
from base64 import b64encode
from pycurl import LOW_SPEED_TIME
-from thread import start_new_thread
from uuid import uuid4
from module.network.HTTPRequest import BadHeader
from module.network.RequestFactory import getURL, getRequest
-from module.plugins.Hook import Hook
+from module.plugins.Hook import Hook, threaded
class ExpertDecoders(Hook):
__name__ = "ExpertDecoders"
__type__ = "hook"
- __version__ = "0.03"
+ __version__ = "0.04"
__config__ = [("force", "bool", "Force CT even if client is connected", False),
("passkey", "password", "Access key", "")]
@@ -50,7 +49,8 @@ class ExpertDecoders(Hook):
return 0
- def processCaptcha(self, task):
+ @threaded
+ def _processCaptcha(self, task):
task.data['ticket'] = ticket = uuid4()
result = None
@@ -85,7 +85,7 @@ class ExpertDecoders(Hook):
if self.getCredits() > 0:
task.handler.append(self)
task.setWaiting(100)
- start_new_thread(self.processCaptcha, (task,))
+ self._processCaptcha(task)
else:
self.logInfo(_("Your ExpertDecoders Account has not enough credits"))