diff --git a/deluge/core/core.py b/deluge/core/core.py index e95490781..73e60bde3 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -507,6 +507,17 @@ class Core( status.update(self.plugins.get_status(torrent_id, leftover_fields)) return status + + def export_get_status(self, keys, filter_dict = None): + """ + returns all torrents , optionally filtered by filter_dict. + """ + if filter_dict: + raise NotImplementedError("not yet") + + torrent_ids = self.torrents.get_torrent_list() + return self.export_get_torrents_status(torrent_ids, keys) + def export_get_torrents_status(self, torrent_ids, keys): status_dict = {}.fromkeys(torrent_ids) diff --git a/deluge/tests/test_filters.py b/deluge/tests/test_filters.py index e9cde54b6..718e4fc47 100644 --- a/deluge/tests/test_filters.py +++ b/deluge/tests/test_filters.py @@ -17,6 +17,10 @@ print sorted(sclient.get_torrent_status(torrent_id,[]).keys()) print sorted(sclient.get_status_keys()) +#default, no filter argument. +print sclient.get_status(["name","state"]) + +print "HI! , after this the errors start" #filters on default state fields print sclient.get_status(["name","state"], {"state":"Paused"}) print sclient.get_status(["name","state"], {"tracker_host":"aelitis.com"})