[Core] Return all plugin status keys with empty list

This commit is contained in:
Calum Lind 2015-09-27 00:29:25 +01:00
parent e5e4ab4e05
commit 8241b2ba3e
2 changed files with 3 additions and 1 deletions

View File

@ -476,7 +476,7 @@ class Core(component.Component):
return {}
# Ask the plugin manager to fill in the plugin keys
if len(plugin_keys) > 0:
if len(plugin_keys) > 0 or all_keys:
status.update(self.pluginmanager.get_status(torrent_id, plugin_keys))
return status

View File

@ -66,6 +66,8 @@ class PluginManager(deluge.pluginmanagerbase.PluginManagerBase, component.Compon
def get_status(self, torrent_id, fields):
"""Return the value of status fields for the selected torrent_id."""
status = {}
if len(fields) == 0:
fields = self.status_fields.keys()
for field in fields:
try:
status[field] = self.status_fields[field](torrent_id)