-
-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toggle plugin dis/enable #4452
Comments
apparently this is not implemented (?) the debug log entries are noise from src/pyload/core/managers/addon_manager.py class AddonManager:
def activate_addon(self, plugin):
# check if already loaded
for inst in self.plugins:
if inst.__name__ == plugin:
return
plugin_class = self.pyload.plugin_manager.load_class("addon", plugin)
if not plugin_class:
return
the following code only works with addons, not with other plugins self.pyload.log.debug(f"Plugin loaded: {plugin}")
plugin = plugin_class(self.pyload, self)
self.plugins.append(plugin)
self.plugin_map[plugin_class.__name__] = plugin
# call core Ready
start_new_thread(plugin.core_ready, tuple()) problem: but for example,
what is src/pyload/core/managers/addon_manager.py class AddonManager:
def __init__(self, core):
# registering callback for config event
self.pyload.config.plugin_cb = MethodType(
self.dispatch_event, "plugin_config_changed"
)
self.add_event("plugin_config_changed", self.manage_addons) patch def load_module(self, module_type, module_name):
plugins = self.plugins[module_type]
# FIXME module_type is always "addon"
# https://github.com/pyload/pyload/issues/4452
# workaround: guess module type
not_plugin_types = (
"account",
"addon",
"base",
)
plugin_types = list(filter(lambda t: t not in not_plugin_types, self.TYPES))
plugin_types.append(module_type)
plugin_types.reverse()
if not module_name in plugins:
self.pyload.log.debug(f"Plugin {module_name}: Invalid plugin type {module_type}. Guessing plugin type")
while not module_name in plugins:
module_type = plugin_types.pop()
plugins = self.plugins[module_type]
if module_name in plugins:
self.pyload.log.debug(f"Plugin {module_name}: Guessed plugin type {module_type}")
if module_name in plugins:
if APPID in plugins[module_name]:
return plugins[module_name][APPID] #: use cached module next error
src/pyload/plugins/base/hoster.py class BaseHoster(BasePlugin):
def __init__(self, pyfile): src/pyload/plugins/base/addon.py class BaseAddon(BasePlugin):
def __init__(self, core, manager): |
Description
Background:
Due to i have running downloads atm I downloaded some of the latest commits manually e.g. KatfileCom.py into my install dir (renamed old one and removed afterwards).
I checked permissiones etc. - all should be fine.
Issue:
I tried to disable and enable the plugin again. The log indicates 'Plugin xxx not found', so i tried to toggle the enable of an other, untouched plugin which leads to the same log lines.
Is the plugin now loaded? There is no log output when disabling a plugin.
The listed (found) addons leads me to the assumption that the enable toggle of a random plugin triggers the search but only checks the folder .../plugins/addons/.
Question:
My assumption was i should be able to disable and enable plugins on the fly. Is this not supported? Should there be a log output when plugin gets disabled or enabled?
Debug log
The text was updated successfully, but these errors were encountered: