diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-15 06:56:13 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-15 06:56:13 +0200 |
commit | f4b893e5ee24769584a2da1866c665489f7019ec (patch) | |
tree | 08d23a536fad2ccb799f683cda6543e1a45bb9a4 | |
parent | Fix https://github.com/pyload/pyload/issues/1498 (diff) | |
download | pyload-f4b893e5ee24769584a2da1866c665489f7019ec.tar.xz |
Hook plugin code cosmetics
-rw-r--r-- | module/plugins/hooks/AndroidPhoneNotify.py | 6 | ||||
-rw-r--r-- | module/plugins/hooks/BypassCaptcha.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/Captcha9Kw.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/CaptchaBrotherhood.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/DeathByCaptcha.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/ExpertDecoders.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/IRCInterface.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/ImageTyperz.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/WindowsPhoneNotify.py | 6 |
9 files changed, 13 insertions, 13 deletions
diff --git a/module/plugins/hooks/AndroidPhoneNotify.py b/module/plugins/hooks/AndroidPhoneNotify.py index f987a890b..d582a4a31 100644 --- a/module/plugins/hooks/AndroidPhoneNotify.py +++ b/module/plugins/hooks/AndroidPhoneNotify.py @@ -60,7 +60,7 @@ class AndroidPhoneNotify(Hook): self.notify(_("Exiting pyLoad")) - def newCaptchaTask(self, task): + def captcha_task(self, task): if not self.getConfig('notifycaptcha'): return @@ -97,13 +97,13 @@ class AndroidPhoneNotify(Hook): elapsed_time = time.time() - self.last_notify - if elapsed_time < self.getConf("sendtimewait"): + if elapsed_time < self.getConfig("sendtimewait"): return if elapsed_time > 60: self.notifications = 0 - elif self.notifications >= self.getConf("sendpermin"): + elif self.notifications >= self.getConfig("sendpermin"): return getURL("http://www.notifymyandroid.com/publicapi/notify", diff --git a/module/plugins/hooks/BypassCaptcha.py b/module/plugins/hooks/BypassCaptcha.py index e2abf617c..4b50ef800 100644 --- a/module/plugins/hooks/BypassCaptcha.py +++ b/module/plugins/hooks/BypassCaptcha.py @@ -95,7 +95,7 @@ class BypassCaptcha(Hook): self.logError(_("Could not send response"), e) - def newCaptchaTask(self, task): + def captcha_task(self, task): if "service" in task.data: return False diff --git a/module/plugins/hooks/Captcha9Kw.py b/module/plugins/hooks/Captcha9Kw.py index 18a078bdb..ea15d7651 100644 --- a/module/plugins/hooks/Captcha9Kw.py +++ b/module/plugins/hooks/Captcha9Kw.py @@ -165,7 +165,7 @@ class Captcha9Kw(Hook): task.setResult(result) - def newCaptchaTask(self, task): + def captcha_task(self, task): if not task.isTextual() and not task.isPositional(): return diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py index 6dbb67335..eecf49515 100644 --- a/module/plugins/hooks/CaptchaBrotherhood.py +++ b/module/plugins/hooks/CaptchaBrotherhood.py @@ -132,7 +132,7 @@ class CaptchaBrotherhood(Hook): return res - def newCaptchaTask(self, task): + def captcha_task(self, task): if "service" in task.data: return False diff --git a/module/plugins/hooks/DeathByCaptcha.py b/module/plugins/hooks/DeathByCaptcha.py index 63c2cd41d..073f01d57 100644 --- a/module/plugins/hooks/DeathByCaptcha.py +++ b/module/plugins/hooks/DeathByCaptcha.py @@ -162,7 +162,7 @@ class DeathByCaptcha(Hook): return ticket, result - def newCaptchaTask(self, task): + def captcha_task(self, task): if "service" in task.data: return False diff --git a/module/plugins/hooks/ExpertDecoders.py b/module/plugins/hooks/ExpertDecoders.py index 105abca79..8a2a836aa 100644 --- a/module/plugins/hooks/ExpertDecoders.py +++ b/module/plugins/hooks/ExpertDecoders.py @@ -72,7 +72,7 @@ class ExpertDecoders(Hook): task.setResult(result) - def newCaptchaTask(self, task): + def captcha_task(self, task): if not task.isTextual(): return False diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 751556158..7e4d50384 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -71,7 +71,7 @@ class IRCInterface(Thread, Hook): pass - def newCaptchaTask(self, task): + def captcha_task(self, task): if self.getConfig('captcha') and task.isTextual(): task.handler.append(self) task.setWaiting(60) diff --git a/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py index 4114a33a8..06c371f1d 100644 --- a/module/plugins/hooks/ImageTyperz.py +++ b/module/plugins/hooks/ImageTyperz.py @@ -109,7 +109,7 @@ class ImageTyperz(Hook): return ticket, result - def newCaptchaTask(self, task): + def captcha_task(self, task): if "service" in task.data: return False diff --git a/module/plugins/hooks/WindowsPhoneNotify.py b/module/plugins/hooks/WindowsPhoneNotify.py index dfc93f89c..97e3b6da4 100644 --- a/module/plugins/hooks/WindowsPhoneNotify.py +++ b/module/plugins/hooks/WindowsPhoneNotify.py @@ -61,7 +61,7 @@ class WindowsPhoneNotify(Hook): self.notify(_("Exiting pyLoad")) - def newCaptchaTask(self, task): + def captcha_task(self, task): if not self.getConfig('notifycaptcha'): return @@ -104,13 +104,13 @@ class WindowsPhoneNotify(Hook): elapsed_time = time.time() - self.last_notify - if elapsed_time < self.getConf("sendtimewait"): + if elapsed_time < self.getConfig("sendtimewait"): return if elapsed_time > 60: self.notifications = 0 - elif self.notifications >= self.getConf("sendpermin"): + elif self.notifications >= self.getConfig("sendpermin"): return request = self.getXmlData("%s: %s" % (event, msg) if msg else event) |