[PR #522] [MERGED] Add options to skip matching media items if they already have an ASIN/ISBN #3366

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/522
Author: @selfhost-alt
Created: 4/27/2022
Status: Merged
Merged: 4/28/2022
Merged by: @advplyr

Base: masterHead: skip-matching-identified-media


📝 Commits (1)

  • 84dd06d Add options to skip matching media items if they already have an ASIN/ISBN

📊 Changes

4 files changed (+45 additions, -4 deletions)

View changed files

📝 client/components/modals/libraries/EditModal.vue (+3 -1)
📝 client/components/modals/libraries/LibrarySettings.vue (+20 -2)
📝 server/objects/settings/LibrarySettings.js (+7 -1)
📝 server/scanner/Scanner.js (+15 -0)

📄 Description

For very large media libraries, the library matcher can spend an inordinate amount of time re-querying info for books that have already been matched. This makes book matching take forever, and I'm also concerned that it could eventually lead to getting your IP blocked for abuse for repeatedly scanning thousands of books at a time.

This PR adds two new switches to the library settings, to skip matching books that already have an ISBN or ASIN set. This gives users more control over whether to skip matching books that have potentially already been matched.

image

When the matcher can skip books that already have an ISBN/ASIN, it will log a messages will look like this:

[2022-04-27T00:33:28.293Z] DEBUG: [Scanner] matchLibraryItems: Skipping "Breakdown" because it already has an ASIN (1 of 6)
[2022-04-27T00:33:28.293Z] DEBUG: [Scanner] matchLibraryItems: Skipping "Bring Me Back" because it already has an ASIN (2 of 6)
[2022-04-27T00:33:28.294Z] DEBUG: [Scanner] matchLibraryItems: Skipping "Two Short Stories from H. E. Joyce" because it already has an ASIN (3 of 6)
[2022-04-27T00:33:28.294Z] DEBUG: [Scanner] matchLibraryItems: Quick matching "Behind Closed Doors" (4 of 6)
[2022-04-27T00:33:28.294Z] DEBUG: Book Search: title: "Behind Closed Doors", author: "B A Paris", provider: audible
[2022-04-27T00:33:28.295Z] DEBUG: [Audible] Search url: https://api.audible.com/1.0/catalog/products?response_groups=rating%2Cseries%2Ccontributors%2Cproduct_desc%2Cmedia%2Cproduct_extended_attrs&image_sizes=500%2C1024%2C2000&num_results=25&products_sort_by=Relevance&title=Behind+Closed+Doors&author=B+A+Paris
[2022-04-27T00:33:28.773Z] DEBUG: [Scanner] Updating details { asin: 'B01GW1OHVI' }
[2022-04-27T00:33:28.775Z] DEBUG: [BookMetadata] Key updated asin B01GW1OHVI
[2022-04-27T00:33:28.777Z] DEBUG: [LibraryItem] Success saving abmetadata to "C:\code\audiobookshelf\metadata\items\li_lsdbal4xc42idrxmaf\metadata.abs"
[2022-04-27T00:33:28.788Z] DEBUG: [DB] Library Items updated 1
[2022-04-27T00:33:28.789Z] DEBUG: [Scanner] matchLibraryItems: Skipping "The Hole" because it already has an ASIN (5 of 6)
[2022-04-27T00:33:28.789Z] DEBUG: [Scanner] matchLibraryItems: Skipping "Dilemma" because it already has an ASIN (6 of 6)

🔄 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/522 **Author:** [@selfhost-alt](https://github.com/selfhost-alt) **Created:** 4/27/2022 **Status:** ✅ Merged **Merged:** 4/28/2022 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `skip-matching-identified-media` --- ### 📝 Commits (1) - [`84dd06d`](https://github.com/advplyr/audiobookshelf/commit/84dd06dfc4ef9a26c50a435cc150bc920437eb31) Add options to skip matching media items if they already have an ASIN/ISBN ### 📊 Changes **4 files changed** (+45 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `client/components/modals/libraries/EditModal.vue` (+3 -1) 📝 `client/components/modals/libraries/LibrarySettings.vue` (+20 -2) 📝 `server/objects/settings/LibrarySettings.js` (+7 -1) 📝 `server/scanner/Scanner.js` (+15 -0) </details> ### 📄 Description For very large media libraries, the library matcher can spend an inordinate amount of time re-querying info for books that have already been matched. This makes book matching take forever, and I'm also concerned that it could eventually lead to getting your IP blocked for abuse for repeatedly scanning thousands of books at a time. This PR adds two new switches to the library settings, to skip matching books that already have an ISBN or ASIN set. This gives users more control over whether to skip matching books that have potentially already been matched. ![image](https://user-images.githubusercontent.com/91645868/165415595-b831bd3c-85c8-4d29-91e7-16b60fb4768e.png) When the matcher can skip books that already have an ISBN/ASIN, it will log a messages will look like this: ``` [2022-04-27T00:33:28.293Z] DEBUG: [Scanner] matchLibraryItems: Skipping "Breakdown" because it already has an ASIN (1 of 6) [2022-04-27T00:33:28.293Z] DEBUG: [Scanner] matchLibraryItems: Skipping "Bring Me Back" because it already has an ASIN (2 of 6) [2022-04-27T00:33:28.294Z] DEBUG: [Scanner] matchLibraryItems: Skipping "Two Short Stories from H. E. Joyce" because it already has an ASIN (3 of 6) [2022-04-27T00:33:28.294Z] DEBUG: [Scanner] matchLibraryItems: Quick matching "Behind Closed Doors" (4 of 6) [2022-04-27T00:33:28.294Z] DEBUG: Book Search: title: "Behind Closed Doors", author: "B A Paris", provider: audible [2022-04-27T00:33:28.295Z] DEBUG: [Audible] Search url: https://api.audible.com/1.0/catalog/products?response_groups=rating%2Cseries%2Ccontributors%2Cproduct_desc%2Cmedia%2Cproduct_extended_attrs&image_sizes=500%2C1024%2C2000&num_results=25&products_sort_by=Relevance&title=Behind+Closed+Doors&author=B+A+Paris [2022-04-27T00:33:28.773Z] DEBUG: [Scanner] Updating details { asin: 'B01GW1OHVI' } [2022-04-27T00:33:28.775Z] DEBUG: [BookMetadata] Key updated asin B01GW1OHVI [2022-04-27T00:33:28.777Z] DEBUG: [LibraryItem] Success saving abmetadata to "C:\code\audiobookshelf\metadata\items\li_lsdbal4xc42idrxmaf\metadata.abs" [2022-04-27T00:33:28.788Z] DEBUG: [DB] Library Items updated 1 [2022-04-27T00:33:28.789Z] DEBUG: [Scanner] matchLibraryItems: Skipping "The Hole" because it already has an ASIN (5 of 6) [2022-04-27T00:33:28.789Z] DEBUG: [Scanner] matchLibraryItems: Skipping "Dilemma" because it already has an ASIN (6 of 6) ``` --- <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:15:22 +02:00
adam closed this issue 2026-04-25 00:15:22 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3366