diff options
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) |