From 62799fb035354cacfa6a5c3646379768beec26e4 Mon Sep 17 00:00:00 2001 From: Alexander Kozlovsky Date: Thu, 29 Sep 2022 23:23:58 +0200 Subject: [PATCH] Show only non-deleted regular torrents in search results list --- src/tribler/gui/widgets/searchresultswidget.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tribler/gui/widgets/searchresultswidget.py b/src/tribler/gui/widgets/searchresultswidget.py index b6ddb990ea3..5eb972d0696 100644 --- a/src/tribler/gui/widgets/searchresultswidget.py +++ b/src/tribler/gui/widgets/searchresultswidget.py @@ -99,7 +99,8 @@ def search(self, query: Query) -> bool: original_query=query.original_query, text_filter=to_fts_query(query.fts_text), tags=list(query.tags), - type_filter=[REGULAR_TORRENT, CHANNEL_TORRENT, COLLECTION_NODE], + type_filter=[REGULAR_TORRENT], + exclude_deleted=True, ) self.results_page_content.initialize_root_model(model) self.setCurrentWidget(self.results_page) @@ -115,7 +116,8 @@ def register_request(response): self.search_request = SearchRequest(response["request_uuid"], query, peers) self.search_progress_bar.set_remote_total(len(peers)) - params = {'txt_filter': fts_query, 'hide_xxx': self.hide_xxx, 'tags': list(query.tags)} + params = {'txt_filter': fts_query, 'hide_xxx': self.hide_xxx, 'tags': list(query.tags), + 'metadata_type': REGULAR_TORRENT, 'exclude_deleted': True} TriblerNetworkRequest('remote_query', register_request, method="PUT", url_params=params) return True