[Core] Return all plugin status keys with empty list
This commit is contained in:
parent
e5e4ab4e05
commit
8241b2ba3e
@ -476,7 +476,7 @@ class Core(component.Component):
|
|||||||
return {}
|
return {}
|
||||||
|
|
||||||
# Ask the plugin manager to fill in the plugin keys
|
# 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))
|
status.update(self.pluginmanager.get_status(torrent_id, plugin_keys))
|
||||||
return status
|
return status
|
||||||
|
|
||||||
|
|||||||
@ -66,6 +66,8 @@ class PluginManager(deluge.pluginmanagerbase.PluginManagerBase, component.Compon
|
|||||||
def get_status(self, torrent_id, fields):
|
def get_status(self, torrent_id, fields):
|
||||||
"""Return the value of status fields for the selected torrent_id."""
|
"""Return the value of status fields for the selected torrent_id."""
|
||||||
status = {}
|
status = {}
|
||||||
|
if len(fields) == 0:
|
||||||
|
fields = self.status_fields.keys()
|
||||||
for field in fields:
|
for field in fields:
|
||||||
try:
|
try:
|
||||||
status[field] = self.status_fields[field](torrent_id)
|
status[field] = self.status_fields[field](torrent_id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user