summaryrefslogtreecommitdiffstats
path: root/module/plugins/PluginManager.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-24 19:48:33 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-24 19:48:33 +0200
commitada420db11c99d1b0758bc8ef9b14b25ff0e16e1 (patch)
tree63d2bc1cfac22d4f3000c73be21abcaa39d2ff26 /module/plugins/PluginManager.py
parentstore cli config per user (diff)
downloadpyload-ada420db11c99d1b0758bc8ef9b14b25ff0e16e1.tar.xz
RealdebridCom plugin
Diffstat (limited to 'module/plugins/PluginManager.py')
-rw-r--r--module/plugins/PluginManager.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/module/plugins/PluginManager.py b/module/plugins/PluginManager.py
index 0ca060152..9f59cb1de 100644
--- a/module/plugins/PluginManager.py
+++ b/module/plugins/PluginManager.py
@@ -213,7 +213,7 @@ class PluginManager():
return res
- def getPlugin(self, name):
+ def getPlugin(self, name, original=False):
"""return plugin module from hoster|decrypter|container"""
plugin = None
@@ -224,6 +224,9 @@ class PluginManager():
if self.hosterPlugins.has_key(name):
plugin = self.hosterPlugins[name]
+ if plugin.has_key("new_module") and not original:
+ return plugin["new_module"]
+
if plugin.has_key("module"):
return plugin["module"]
@@ -231,6 +234,22 @@ class PluginManager():
return plugin["module"]
+ def getPluginName(self, name):
+ """ used to obtain new name if other plugin was injected"""
+ plugin = None
+ if self.containerPlugins.has_key(name):
+ plugin = self.containerPlugins[name]
+ if self.crypterPlugins.has_key(name):
+ plugin = self.crypterPlugins[name]
+ if self.hosterPlugins.has_key(name):
+ plugin = self.hosterPlugins[name]
+
+ if plugin.has_key("new_name"):
+ return plugin["new_name"]
+
+ return plugin["name"]
+
+
def getCaptchaPlugin(self, name):
"""return captcha modul if existent"""
@@ -285,6 +304,9 @@ class PluginManager():
if not self.core.config.getPlugin(name, "load"):
continue
except:
+ if self.core.debug:
+ print_exc()
+
self.log.debug("Failed to load %s" % name)
continue