Fix starting plugins when enabled

This commit is contained in:
Andrew Resch 2009-07-06 05:18:18 +00:00
parent cdddc38780
commit efa125ac83
1 changed files with 4 additions and 2 deletions

View File

@ -44,6 +44,8 @@ import deluge.common
import deluge.configmanager
from deluge.log import LOG as log
import deluge.component as component
METADATA_KEYS = [
"Name",
"License",
@ -132,8 +134,8 @@ class PluginManagerBase:
log.error("Unable to instantiate plugin!")
log.exception(e)
instance.enable()
if self.get_state() == "Started":
component.start(instance.get_component_name())
if self.get_state() == component.COMPONENT_STATE.index("Started"):
component.start(instance.plugin.get_component_name())
plugin_name = plugin_name.replace("-", " ")
self.plugins[plugin_name] = instance
if plugin_name not in self.config["enabled_plugins"]: