diff options
author | 2014-10-22 19:44:59 +0200 | |
---|---|---|
committer | 2014-10-22 19:47:17 +0200 | |
commit | 0eb6e7ec4a1144dcca824d8add049787d3da1762 (patch) | |
tree | d653f5fe28bb247a3c4fadeca9bf6278d744f929 /module/plugins/Hook.py | |
parent | Spare code cosmetics (diff) | |
download | pyload-0eb6e7ec4a1144dcca824d8add049787d3da1762.tar.xz |
Two space before function declaration
Diffstat (limited to 'module/plugins/Hook.py')
-rw-r--r-- | module/plugins/Hook.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/module/plugins/Hook.py b/module/plugins/Hook.py index 1e4749cd5..4d43b70f7 100644 --- a/module/plugins/Hook.py +++ b/module/plugins/Hook.py @@ -81,10 +81,12 @@ class Hook(Base): self.initPeriodical() self.setup() + def initPeriodical(self): if self.interval >=1: self.cb = self.core.scheduler.addJob(0, self._periodical, threaded=False) + def _periodical(self): try: if self.isActivated(): self.periodical() @@ -99,14 +101,17 @@ class Hook(Base): def __repr__(self): return "<Hook %s>" % self.__name__ + def setup(self): """ more init stuff if needed """ pass + def unload(self): """ called when hook was deactivated """ pass + def isActivated(self): """ checks if hook is activated""" return self.config.getPlugin(self.__name__, "activated") @@ -116,36 +121,47 @@ class Hook(Base): def coreReady(self): pass + def coreExiting(self): pass + def downloadPreparing(self, pyfile): pass + def downloadFinished(self, pyfile): pass + def downloadFailed(self, pyfile): pass + def packageFinished(self, pypack): pass + def beforeReconnecting(self, ip): pass + def afterReconnecting(self, ip): pass + def periodical(self): pass + def newCaptchaTask(self, task): """ new captcha task for the plugin, it MUST set the handler and timeout or will be ignored """ pass + def captchaCorrect(self, task): pass + def captchaInvalid(self, task): pass |