[PR #2400] [MERGED] A few BookFinder improvements (including a fix for #2238) #3707

Closed
opened 2026-04-25 00:16:43 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/2400
Author: @mikiher
Created: 12/8/2023
Status: Merged
Merged: 12/10/2023
Merged by: @advplyr

Base: masterHead: bookfinder-improvements


📝 Commits (7)

  • 80458e2 "[un]abridged" in title candidate generation
  • 8ac0ce3 Remove "et al[.]" in author cleanup
  • 3c6d6bf Merge branch 'advplyr:master' into bookfinder-improvements
  • 281de48 Fix "et al" cleanup
  • b6c789d Merge branch 'advplyr:master' into bookfinder-improvements
  • 0282a05 Sort audible match results by duration difference
  • b580a23 BookFinder formatting update

📊 Changes

5 files changed (+77 additions, -19 deletions)

View changed files

📝 client/components/modals/item/tabs/Match.vue (+1 -0)
📝 server/controllers/SearchController.js (+4 -1)
📝 server/finders/BookFinder.js (+25 -6)
📝 server/scanner/Scanner.js (+1 -1)
📝 test/server/finders/BookFinder.test.js (+46 -11)

📄 Description

The following improvements were implemented:

  • Handle "abridged/unabridged" in titleCandidate generation
  • Clean up "et al[.]" in author normalization.
  • Sort Audible match results by ascending duration difference
    • this required an API change, since up until now /search/books had no context (it only accepted title, author, and provider). We now pass the libraryItem id from the client, retrieve it from the database, and pass it to BookFinder.search().
    • This change is fully backwards-compatible.
    • This change is also generally a good preparation for future context-based matching improvements (e.g. prefer results with same narrator)
    • I believe this resolves #2238

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/2400 **Author:** [@mikiher](https://github.com/mikiher) **Created:** 12/8/2023 **Status:** ✅ Merged **Merged:** 12/10/2023 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `bookfinder-improvements` --- ### 📝 Commits (7) - [`80458e2`](https://github.com/advplyr/audiobookshelf/commit/80458e24bd94357ccc6178ac4ce0ecde8c6d47c1) "[un]abridged" in title candidate generation - [`8ac0ce3`](https://github.com/advplyr/audiobookshelf/commit/8ac0ce399f8dbe5082fb933c2510423b1251ab8a) Remove "et al[.]" in author cleanup - [`3c6d6bf`](https://github.com/advplyr/audiobookshelf/commit/3c6d6bf6887ee8919f2986d3c53a3ee8b7c72cb2) Merge branch 'advplyr:master' into bookfinder-improvements - [`281de48`](https://github.com/advplyr/audiobookshelf/commit/281de48ed4b0bc67d48e7a8ec1f85e4dbdeaa247) Fix "et al" cleanup - [`b6c789d`](https://github.com/advplyr/audiobookshelf/commit/b6c789dee6e7ee19c7e6ab79b3187979621a9776) Merge branch 'advplyr:master' into bookfinder-improvements - [`0282a05`](https://github.com/advplyr/audiobookshelf/commit/0282a0521b8466c0af521f017c5a16dd8fcdfa8a) Sort audible match results by duration difference - [`b580a23`](https://github.com/advplyr/audiobookshelf/commit/b580a23e7e05818a3d7ba38abf40f3450852eece) BookFinder formatting update ### 📊 Changes **5 files changed** (+77 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `client/components/modals/item/tabs/Match.vue` (+1 -0) 📝 `server/controllers/SearchController.js` (+4 -1) 📝 `server/finders/BookFinder.js` (+25 -6) 📝 `server/scanner/Scanner.js` (+1 -1) 📝 `test/server/finders/BookFinder.test.js` (+46 -11) </details> ### 📄 Description The following improvements were implemented: - Handle "abridged/unabridged" in titleCandidate generation - Clean up "et al[.]" in author normalization. - Sort Audible match results by ascending duration difference - this required an API change, since up until now /search/books had no context (it only accepted title, author, and provider). We now pass the libraryItem id from the client, retrieve it from the database, and pass it to BookFinder.search(). - This change is fully backwards-compatible. - This change is also generally a good preparation for future context-based matching improvements (e.g. prefer results with same narrator) - I believe this resolves #2238 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:16:43 +02:00
adam closed this issue 2026-04-25 00:16:43 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3707