diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index 4a804490..94b16392 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -16,7 +16,7 @@ class Plugin(object): def getName(self): return self.__class__.__name__ - def registerStatic(self, plugin_file): + def registerStatic(self, plugin_file, add_to_head = True): # Register plugin path self.plugin_path = os.path.dirname(plugin_file) @@ -28,8 +28,9 @@ class Plugin(object): path = 'static/' + class_name + '/' addView(path + '', self.showStatic, static = True) - for file in glob.glob(os.path.join(self.plugin_path, 'static', '*')): - fireEvent('register_script' if getExt(file) in 'js' else 'register_style', path + os.path.basename(file)) + if add_to_head: + for file in glob.glob(os.path.join(self.plugin_path, 'static', '*')): + fireEvent('register_%s' % ('script' if getExt(file) in 'js' else 'style'), path + os.path.basename(file)) def showStatic(self, file = ''): dir = os.path.join(self.plugin_path, 'static') diff --git a/couchpotato/core/plugins/extension/main.py b/couchpotato/core/plugins/extension/main.py index f961ee84..80d18e5d 100644 --- a/couchpotato/core/plugins/extension/main.py +++ b/couchpotato/core/plugins/extension/main.py @@ -4,4 +4,4 @@ from couchpotato.core.plugins.base import Plugin class Extension(Plugin): def __init__(self): - self.registerStatic(__file__) + self.registerStatic(__file__, add_to_head = False)