NZB/Torrent provider base

This commit is contained in:
Ruud
2011-04-12 10:43:37 +02:00
parent 3833b6ead1
commit 05f6d57ea3
21 changed files with 395 additions and 73 deletions
+10 -1
View File
@@ -7,7 +7,10 @@ import os.path
class Plugin():
def conf(self, attr):
return Env.setting(attr, self.__class__.__name__.lower())
return Env.setting(attr, self.getName().lower())
def getName(self):
return self.__class__.__name__
def registerStatic(self, file_path):
@@ -25,3 +28,9 @@ class Plugin():
dir = os.path.join(plugin_dir, 'static')
return send_from_directory(dir, file)
def isDisabled(self):
return not self.isEnabled()
def isEnabled(self):
return self.conf('enabled', True)