[Core] Return plugin keys with get_torrents_status
When requesting all keys, get_torrents_status was missing plugin added keys This commit brings the behavior in line with get_torrent_status, and deluge 1.3 Closes: https://dev.deluge-torrent.org/ticket/3357 Closes: https://github.com/deluge-torrent/deluge/pull/347
This commit is contained in:
parent
7c9a542006
commit
d8746a8852
|
@ -763,25 +763,21 @@ class Core(component.Component):
|
||||||
)
|
)
|
||||||
|
|
||||||
@export
|
@export
|
||||||
|
@defer.inlineCallbacks
|
||||||
def get_torrents_status(self, filter_dict, keys, diff=False):
|
def get_torrents_status(self, filter_dict, keys, diff=False):
|
||||||
"""
|
"""
|
||||||
returns all torrents , optionally filtered by filter_dict.
|
returns all torrents , optionally filtered by filter_dict.
|
||||||
"""
|
"""
|
||||||
|
all_keys = not keys
|
||||||
torrent_ids = self.filtermanager.filter_torrent_ids(filter_dict)
|
torrent_ids = self.filtermanager.filter_torrent_ids(filter_dict)
|
||||||
d = self.torrentmanager.torrents_status_update(torrent_ids, keys, diff=diff)
|
status_dict, plugin_keys = yield self.torrentmanager.torrents_status_update(
|
||||||
|
torrent_ids, keys, diff=diff
|
||||||
def add_plugin_fields(args):
|
)
|
||||||
status_dict, plugin_keys = args
|
# 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 or all_keys:
|
||||||
if len(plugin_keys) > 0:
|
for key in status_dict:
|
||||||
for key in status_dict:
|
status_dict[key].update(self.pluginmanager.get_status(key, plugin_keys))
|
||||||
status_dict[key].update(
|
return status_dict
|
||||||
self.pluginmanager.get_status(key, plugin_keys)
|
|
||||||
)
|
|
||||||
return status_dict
|
|
||||||
|
|
||||||
d.addCallback(add_plugin_fields)
|
|
||||||
return d
|
|
||||||
|
|
||||||
@export
|
@export
|
||||||
def get_filter_tree(self, show_zero_hits=True, hide_cat=None):
|
def get_filter_tree(self, show_zero_hits=True, hide_cat=None):
|
||||||
|
|
Loading…
Reference in New Issue