diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-27 23:03:29 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-27 23:03:29 +0100 |
commit | b6f2bcc48d610e35df3038a9cdf2c07c39f62000 (patch) | |
tree | 3056d7f240fd76f4580f32dabd7df24512a2c3b0 /module/plugins/Plugin.py | |
parent | [Crypter] Rewitten (diff) | |
download | pyload-b6f2bcc48d610e35df3038a9cdf2c07c39f62000.tar.xz |
[Plugin] Initial support for plugin deactivation
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r-- | module/plugins/Plugin.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 18f51aab7..8e5c01616 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -51,7 +51,6 @@ class Base(object): A Base class with log/config/db methods *all* plugin types can use """ - def __init__(self, core): #: Core instance self.core = core @@ -143,23 +142,25 @@ class Plugin(Base): Base plugin for hoster/crypter. Overwrite `process` / `decrypt` in your subclassed plugin. """ - __name__ = "Plugin" - __type__ = "hoster" + __name__ = "Plugin" + __type__ = "hoster" __version__ = "0.4" __pattern__ = None - __config__ = [("name", "type", "desc", "default")] + __config__ = [] #: [("name", "type", "desc", "default")] __description__ = """Base plugin""" - __license__ = "GPLv3" - __authors__ = [("RaNaN", "RaNaN@pyload.org"), - ("spoob", "spoob@pyload.org"), - ("mkaay", "mkaay@mkaay.de")] + __license__ = "GPLv3" + __authors__ = [("RaNaN", "RaNaN@pyload.org"), + ("spoob", "spoob@pyload.org"), + ("mkaay", "mkaay@mkaay.de")] def __init__(self, pyfile): Base.__init__(self, pyfile.m.core) + self.__config__.insert(("activated", "bool", "Activated", True)) + self.wantReconnect = False #: enables simultaneous processing of multiple downloads self.multiDL = True @@ -313,7 +314,7 @@ class Plugin(Base): if not reason and not type: type = "unknown" - msg = _("%s error") % type.strip().capitalize() if type else _("Error") + msg = _("%s error") % _(type.strip().capitalize()) if type else _("Error") msg += ": " + reason.strip() if reason else "" msg += _(" | Plugin may be out of date") |