fix: update no search result handling to work

This commit is contained in:
Vxrtrauter
2025-10-14 09:06:51 +02:00
parent 991ea47b40
commit 6de5337e77
+7 -5
View File
@@ -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