librislog icon indicating copy to clipboard operation
librislog copied to clipboard

[Feature Request] Multiple book searches

Open codebude opened this issue 2 months ago • 8 comments

Quoted from @DawidGardzinski in the original issue Feedback after 1-2 weeks of using Libris (#78).

It would be great to have the ability to search for multiple books from the upload view.


Author: @DawidGardzinski Original issue: https://github.com/codebude/librislog/issues/78

codebude avatar Sep 03 '26 16:09 codebude

By "Upload view" do you mean the dialog for adding a book to the library? If so, how do you imagine "Multiple book searches"? Would it be enough to simply not close the dialog after clicking "Add" and to clear the search form/input and the results list? If so, should that become the default behavior, or do we want a toggle where you can choose whether you want to add one or multiple books?

@DawidGardzinski Just adding you here so you see my reply – looking forward to your take on this.

codebude avatar Sep 04 '26 12:09 codebude

I meant sth like this: image

DawidGardzinski avatar Sep 05 '26 16:09 DawidGardzinski

@DawidGardzinski implemented in #102 . Feel free to test.

codebude avatar Sep 11 '26 12:09 codebude

I tested it, and with this approach there is still no way to search for multiple books at the same time.

Before the user can add another book to the basket, they still have to wait for the previous search to finish. It is a step in the right direction compared with having to click through the flow each time, but it still does not allow multiple queries to run simultaneously.

DawidGardzinski avatar Sep 13 '26 20:09 DawidGardzinski

Ok, then I didn't got you point. Probably because I have another experience than you. How long does a search for your take? At my setup a search usually take between 1-4 seconds. That's usually fast, then I could type a second search. Is it slower for you?

codebude avatar Sep 13 '26 21:09 codebude

for open library it takes on avg. 9-10 sec

Image

for google api up to 30sec

Image

(no throttling, 300mb/s download, 120mb/s upload)

DawidGardzinski avatar Sep 13 '26 21:09 DawidGardzinski

Ok, that is really slow and I understand why you like to run searches in parallel... Before I implement it, which is quite some hussle, I would kindly ask you to run this command (you have to pass your Google Books API key to the command):

curl -w '\nDNS:        %{time_namelookup}\nConnect:    %{time_connect}\nTLS:        %{time_appconnect}\nTTFB:       %{time_starttransfer}\nTotal:      %{time_total}\n' \
  -o /dev/null \
  'https://www.googleapis.com/books/v1/volumes?q=isbn:9780132350884&key=<your key>'

30 seconds is very unusual for an Google Books API call. Probably you have some DNS problem, which makes things so slow. This command may help to find the source of your problem.

For me it looks like:

DNS: 0.016355   Connect: 0.030439   TLS: 0.060777   TTFB: 0.426362   Total: 0.428065

HTTP: 200   Size: 2914

codebude avatar Sep 14 '26 04:09 codebude

Regardless of your performance issues (I still believe you might have some DNS/network problem), I have implemented a parallel search feature in #105

Image

codebude avatar Sep 15 '26 07:09 codebude