commit AI suggested performance enhancements

This commit is contained in:
2025-10-07 14:42:40 +02:00
parent 06965db26a
commit 7e07bdea0c
3 changed files with 42 additions and 17 deletions

View File

@@ -32,6 +32,7 @@ class CheckThread(QtCore.QThread):
range(len(self.items)),
unit_scale=True,
)
swb_client = SWB()
for i in tqdm_object:
book: BookData = self.items[i]
author = (
@@ -43,7 +44,7 @@ class CheckThread(QtCore.QThread):
# remove trailing punctuation from title
title = book.title.rstrip(" .:,;!?")
response: list[BookData] = []
response = SWB().getBooks(
response = swb_client.getBooks(
[
"pica.bib=20735",
f"pica.tit={title.split(':')[0].strip()}",
@@ -88,4 +89,6 @@ class ProgressDialog(QDialog):
layout.addWidget(self.start_button)
def start(self):
# Start logic is managed externally; keep method for UI wiring
pass