summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-12-16 12:37:44 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-12-27 22:35:35 +0100
commit303036bce2a68569d721ae88d29b7b46a70d8f36 (patch)
tree2a6ca07283243200b7a03d92300175b954f34420
parent[Captcha] Update (diff)
downloadpyload-303036bce2a68569d721ae88d29b7b46a70d8f36.tar.xz
New plugin: EventMapper
-rw-r--r--module/plugins/hooks/EventMapper.py80
1 files changed, 80 insertions, 0 deletions
diff --git a/module/plugins/hooks/EventMapper.py b/module/plugins/hooks/EventMapper.py
new file mode 100644
index 000000000..ca1be2bdd
--- /dev/null
+++ b/module/plugins/hooks/EventMapper.py
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+
+from module.plugins.internal.Addon import Addon
+
+
+class EventMapper(Addon):
+ __name__ = "EventMapper"
+ __type__ = "hook"
+ __version__ = "0.01"
+ __status__ = "testing"
+
+ __config__ = [("activated", "bool", "Activated", True)]
+
+ __description__ = """Map old events to new events"""
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ def activate(self, *args):
+ self.manager.dispatchEvent("activate", *args)
+
+
+ def exit(self, *args):
+ self.manager.dispatchEvent("exit", *args)
+
+
+ def config_changed(self, *args):
+ self.manager.dispatchEvent("config_changed", *args)
+
+
+ def all_downloads_finished(self, *args):
+ self.manager.dispatchEvent("all_downloads_finished", *args)
+
+
+ def all_downloads_processed(self, *args):
+ self.manager.dispatchEvent("all_downloads_processed", *args)
+
+
+ def links_added(self, *args):
+ self.manager.dispatchEvent("links_added", *args)
+
+
+ def download_preparing(self, *args):
+ self.manager.dispatchEvent("download_preparing", *args)
+
+
+ def download_finished(self, *args):
+ self.manager.dispatchEvent("download_finished", *args)
+
+
+ def download_failed(self, *args):
+ self.manager.dispatchEvent("download_failed", *args)
+
+
+ def package_deleted(self, *args):
+ self.manager.dispatchEvent("package_deleted", *args)
+
+
+ def package_finished(self, *args):
+ self.manager.dispatchEvent("package_finished", *args)
+
+
+ def before_reconnect(self, *args):
+ self.manager.dispatchEvent("before_reconnect", *args)
+
+
+ def after_reconnect(self, *args):
+ self.manager.dispatchEvent("after_reconnect", *args)
+
+
+ def captcha_task(self, *args):
+ self.manager.dispatchEvent("captcha_task", *args)
+
+
+ def captcha_correct(self, *args):
+ self.manager.dispatchEvent("captcha_correct", *args)
+
+
+ def captcha_invalid(self, *args):
+ self.manager.dispatchEvent("captcha_invalid", *args)