summaryrefslogtreecommitdiffstats
path: root/pyload/api
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-03 21:20:20 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-03 21:20:20 +0200
commitf6e5359110f4bd5facc04a98f94acbc41b6e5228 (patch)
tree1f625724951c1b3a848f96c65708f437807f7190 /pyload/api
parent[UpdateManager] Support new plugins structure (diff)
downloadpyload-f6e5359110f4bd5facc04a98f94acbc41b6e5228.tar.xz
Update pyload to the new plugins structure
Diffstat (limited to 'pyload/api')
-rw-r--r--pyload/api/__init__.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/pyload/api/__init__.py b/pyload/api/__init__.py
index 9c4740e82..a6927b238 100644
--- a/pyload/api/__init__.py
+++ b/pyload/api/__init__.py
@@ -145,7 +145,7 @@ class Api(Iface):
:param value: new config value
:param section: 'plugin' or 'core
"""
- self.core.hookManager.dispatchEvent("configChanged", category, option, value, section)
+ self.core.addonManager.dispatchEvent("configChanged", category, option, value, section)
if section == "core":
self.core.config[category][option] = value
@@ -960,12 +960,12 @@ class Api(Iface):
@permission(PERMS.STATUS)
def getServices(self):
- """ A dict of available services, these can be defined by hook plugins.
+ """ A dict of available services, these can be defined by addon plugins.
:return: dict with this style: {"plugin": {"method": "description"}}
"""
data = {}
- for plugin, funcs in self.core.hookManager.methods.iteritems():
+ for plugin, funcs in self.core.addonManager.methods.iteritems():
data[plugin] = funcs
return data
@@ -978,12 +978,12 @@ class Api(Iface):
:param func:
:return: bool
"""
- cont = self.core.hookManager.methods
+ cont = self.core.addonManager.methods
return plugin in cont and func in cont[plugin]
@permission(PERMS.STATUS)
def call(self, info):
- """Calls a service (a method in hook plugin).
+ """Calls a service (a method in addon plugin).
:param info: `ServiceCall`
:return: result
@@ -999,18 +999,18 @@ class Api(Iface):
raise ServiceDoesNotExists(plugin, func)
try:
- ret = self.core.hookManager.callRPC(plugin, func, args, parse)
+ ret = self.core.addonManager.callRPC(plugin, func, args, parse)
return str(ret)
except Exception, e:
raise ServiceException(e.message)
@permission(PERMS.STATUS)
def getAllInfo(self):
- """Returns all information stored by hook plugins. Values are always strings
+ """Returns all information stored by addon plugins. Values are always strings
:return: {"plugin": {"name": value}}
"""
- return self.core.hookManager.getAllInfo()
+ return self.core.addonManager.getAllInfo()
@permission(PERMS.STATUS)
def getInfoByPlugin(self, plugin):
@@ -1019,7 +1019,7 @@ class Api(Iface):
:param plugin: pluginname
:return: dict of attr names mapped to value {"name": value}
"""
- return self.core.hookManager.getInfo(plugin)
+ return self.core.addonManager.getInfo(plugin)
def changePassword(self, user, oldpw, newpw):
""" changes password for specific user """