summaryrefslogtreecommitdiffstats
path: root/pyload/plugins
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-20 02:32:36 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-20 02:32:36 +0100
commit6acbca30b0de51462b1a486c83d936c0c4f5d94e (patch)
treebb6aae47aca0294302b33be816bef3e30d397add /pyload/plugins
parent[Addon] Periodical default to off (diff)
downloadpyload-6acbca30b0de51462b1a486c83d936c0c4f5d94e.tar.xz
Import threading instead thread + thread cleanup
Diffstat (limited to 'pyload/plugins')
-rw-r--r--pyload/plugins/hook/BypassCaptcha.py4
-rw-r--r--pyload/plugins/hook/Captcha9kw.py4
-rw-r--r--pyload/plugins/hook/CaptchaBrotherhood.py3
-rw-r--r--pyload/plugins/hook/DeathByCaptcha.py3
-rw-r--r--pyload/plugins/hook/ExpertDecoders.py4
-rw-r--r--pyload/plugins/hook/ImageTyperz.py4
6 files changed, 6 insertions, 16 deletions
diff --git a/pyload/plugins/hook/BypassCaptcha.py b/pyload/plugins/hook/BypassCaptcha.py
index c8842b1bf..112066353 100644
--- a/pyload/plugins/hook/BypassCaptcha.py
+++ b/pyload/plugins/hook/BypassCaptcha.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
from pycurl import FORM_FILE, LOW_SPEED_TIME
-from thread import start_new_thread
from pyload.network.HTTPRequest import BadHeader
from pyload.network.RequestFactory import getURL, getRequest
@@ -107,8 +106,7 @@ class BypassCaptcha(Hook):
task.handler.append(self)
task.data['service'] = self.__name__
task.setWaiting(100)
- start_new_thread(self.processCaptcha, (task,))
-
+ self.processCaptcha(task)
else:
self.logInfo(_("Your %s account has not enough credits") % self.__name__)
diff --git a/pyload/plugins/hook/Captcha9kw.py b/pyload/plugins/hook/Captcha9kw.py
index d99ceeec3..fa4710542 100644
--- a/pyload/plugins/hook/Captcha9kw.py
+++ b/pyload/plugins/hook/Captcha9kw.py
@@ -5,7 +5,6 @@ from __future__ import with_statement
import re
from base64 import b64encode
-from thread import start_new_thread
from time import sleep
from pyload.network.HTTPRequest import BadHeader
@@ -19,8 +18,7 @@ class Captcha9kw(Hook):
__type__ = "hook"
__version__ = "0.24"
- __config__ = [("activated", "bool", "Activated", True),
- ("ssl", "bool", "Use HTTPS", True),
+ __config__ = [("ssl", "bool", "Use HTTPS", True),
("force", "bool", "Force captcha resolving even if client is connected", True),
("confirm", "bool", "Confirm Captcha (cost +6 credits)", False),
("captchaperhour", "int", "Captcha per hour", "9999"),
diff --git a/pyload/plugins/hook/CaptchaBrotherhood.py b/pyload/plugins/hook/CaptchaBrotherhood.py
index 208462c14..8c037009a 100644
--- a/pyload/plugins/hook/CaptchaBrotherhood.py
+++ b/pyload/plugins/hook/CaptchaBrotherhood.py
@@ -10,7 +10,6 @@ try:
except ImportError:
import Image
-from thread import start_new_thread
from time import sleep
from urllib import urlencode
@@ -145,7 +144,7 @@ class CaptchaBrotherhood(Hook):
task.handler.append(self)
task.data['service'] = self.__name__
task.setWaiting(100)
- start_new_thread(self.processCaptcha, (task,))
+ self.processCaptcha(task)
else:
self.logInfo(_("Your CaptchaBrotherhood Account has not enough credits"))
diff --git a/pyload/plugins/hook/DeathByCaptcha.py b/pyload/plugins/hook/DeathByCaptcha.py
index e4477565c..429258f89 100644
--- a/pyload/plugins/hook/DeathByCaptcha.py
+++ b/pyload/plugins/hook/DeathByCaptcha.py
@@ -6,7 +6,6 @@ import re
from base64 import b64encode
from pycurl import FORM_FILE, HTTPHEADER
-from thread import start_new_thread
from time import sleep
from pyload.utils import json_loads
@@ -186,7 +185,7 @@ class DeathByCaptcha(Hook):
task.handler.append(self)
task.data['service'] = self.__name__
task.setWaiting(180)
- start_new_thread(self.processCaptcha, (task,))
+ self.processCaptcha(task)
def captchaInvalid(self, task):
diff --git a/pyload/plugins/hook/ExpertDecoders.py b/pyload/plugins/hook/ExpertDecoders.py
index f57ef55bb..658a55288 100644
--- a/pyload/plugins/hook/ExpertDecoders.py
+++ b/pyload/plugins/hook/ExpertDecoders.py
@@ -4,7 +4,6 @@ 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 pyload.network.HTTPRequest import BadHeader
@@ -76,8 +75,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"))
diff --git a/pyload/plugins/hook/ImageTyperz.py b/pyload/plugins/hook/ImageTyperz.py
index 1c99d48c1..57a734884 100644
--- a/pyload/plugins/hook/ImageTyperz.py
+++ b/pyload/plugins/hook/ImageTyperz.py
@@ -6,7 +6,6 @@ import re
from base64 import b64encode
from pycurl import FORM_FILE, LOW_SPEED_TIME
-from thread import start_new_thread
from pyload.network.RequestFactory import getURL, getRequest
from pyload.plugins.internal.Addon import Hook
@@ -121,8 +120,7 @@ class ImageTyperz(Hook):
task.handler.append(self)
task.data['service'] = self.__name__
task.setWaiting(100)
- start_new_thread(self.processCaptcha, (task,))
-
+ self.processCaptcha(task)
else:
self.logInfo(_("Your %s account has not enough credits") % self.__name__)