anpigon/obsidian-book-search-plugin

When searching for a book that's not in my "Preferred locale", I don't get any results

fkuersch opened this issue · 2 comments

Steps to reproduce:

  1. In the plugin settings, set the "Preferred locale" to "de".
  2. Execute the command "Book Search: Create new book note"
  3. Enter "0134757599" (ISBN for "Martin Fowler - Refactoring" in english) into the search box and confirm with pressing return

Current behavior:
Get 1 faulty result (a cookbook)

Expected behavior:
Get "Martin Fowler - Refactoring" as a result

My thoughts:
It looks like the GoogleBooksApi restricts the search results to the selected language, so no other languages are allowed. Users who read books in several different languages need to first go to the settings and change the preferred locale to be able find the book, even if they enter the exact matching ISBN.

On the other hand, there's chaos if the locale is not restricted at all, see #24. Maybe there's an option in the Google Books API to rank the search results based on the preferred language, but also include other languages. Or probably better: restrict the results language to a list of languages (instead of only one).