MCPcopy Index your code
hub / github.com/pyload/pyload / init_plugin

Method init_plugin

module/plugins/internal/MultiAccount.py:67–79  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 self.init_plugin()
66
67 def init_plugin(self):
68 plugin, self.plugintype = self.pyload.pluginManager.findPlugin(self.classname)
69
70 if plugin:
71 self.pluginmodule = self.pyload.pluginManager.loadModule(self.plugintype, self.classname)
72 self.pluginclass = self.pyload.pluginManager.loadClass(self.plugintype, self.classname)
73
74 self.pyload.hookManager.addEvent("plugin_updated", self.plugins_updated)
75
76 self.periodical.start(3, threaded=True)
77
78 else:
79 self.log_warning(_("Multi-hoster feature will be deactivated due missing plugin reference"))
80
81 def plugins_updated(self, type_plugins):
82 if not any([t in ("internal", "hook") for t,n in type_plugins]): #: do nothing if restart required

Callers 1

initMethod · 0.95

Calls 7

findPluginMethod · 0.80
loadModuleMethod · 0.80
loadClassMethod · 0.80
log_warningMethod · 0.80
_Function · 0.50
addEventMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected