From 6de5337e774f8fd0d33da3593aab70116253aa0a Mon Sep 17 00:00:00 2001 From: Vxrtrauter Date: Tue, 14 Oct 2025 09:06:51 +0200 Subject: [PATCH] fix: update no search result handling to work --- core/interface/utils/searchhelper.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/interface/utils/searchhelper.py b/core/interface/utils/searchhelper.py index 2e03f13..539dfc9 100644 --- a/core/interface/utils/searchhelper.py +++ b/core/interface/utils/searchhelper.py @@ -25,6 +25,12 @@ def return_pressed(self): self.post_author_list.addItems(state.post_author) if state.tracker == "rutracker": _, state.posts, _, _, cached = split_data(response) + if state.posts == []: + if state.debug: + print(f"No Results found for \"{search_text}\"") + self.softwareList.clear() + self.softwareList.addItem("No Results") # replace with no results text in center + state.post_titles, _, state.post_author = format_data(state.posts) self.post_author_list.clear() self.post_author_list.addItems(state.post_author) @@ -32,8 +38,4 @@ def return_pressed(self): self.softwareList.addItems(state.post_titles) if state.debug == True: print(f"Cached: {cached}") - if not response: - if state.debug: - print(f"No Results found for \"{search_text}\"") - self.softwareList.clear() - self.softwareList.addItem("No Results") # replace with no results text in center \ No newline at end of file +