diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-12-29 21:07:28 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-12-29 21:07:28 +0100 |
commit | 8318540e162cccbb049bebebc5aca03384a1e4e9 (patch) | |
tree | 5b4dc38520a82b5c8044a026ab996be1d71a782e /pyload/plugins/Base.py | |
parent | added auth to request class (diff) | |
download | pyload-8318540e162cccbb049bebebc5aca03384a1e4e9.tar.xz |
added progress type enum, new DebugCrypter + Hoster, little improvements for crypter api
Diffstat (limited to 'pyload/plugins/Base.py')
-rw-r--r-- | pyload/plugins/Base.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pyload/plugins/Base.py b/pyload/plugins/Base.py index 9dcb99453..97fb027d8 100644 --- a/pyload/plugins/Base.py +++ b/pyload/plugins/Base.py @@ -40,7 +40,10 @@ class Base(object): """ The Base plugin class with all shared methods and every possible attribute for plugin definition. """ + #: Version as string or number __version__ = "0.1" + # Type of the plugin, will be inherited and should not be set! + __type__ = "" #: Regexp pattern which will be matched for download/crypter plugins __pattern__ = r"" #: Internal addon plugin which is always loaded @@ -150,6 +153,11 @@ class Base(object): """ Name of the plugin class """ return self.__name__ + @property + def pattern(self): + """ Gives the compiled pattern of the plugin """ + return self.core.pluginManager.getPlugin(self.__type__, self.__name__).re + def setConfig(self, option, value): """ Set config value for current plugin """ self.core.config.set(self.__name__, option, value) |