From d31ec055f9b7eb73db82874b72582c0e1c6d84d4 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 17 Jun 2022 10:31:31 -0700 Subject: [PATCH] check if cleantitle and cleanauthor are different --- server/finders/BookFinder.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/finders/BookFinder.js b/server/finders/BookFinder.js index 8fe3f647..d893cd3f 100644 --- a/server/finders/BookFinder.js +++ b/server/finders/BookFinder.js @@ -209,9 +209,13 @@ class BookFinder { } if (!books.length && !options.currentlyTryingCleaned) { + var cleanedTitle = this.cleanTitleForCompares(title) + var cleanedAuthor = this.cleanAuthorForCompares(author) + if (cleanedTitle == title && cleanedAuthor == author) return books + Logger.debug(`Book Search, no matches.. checking cleaned title and author`) options.currentlyTryingCleaned = true - return this.search(provider, this.cleanTitleForCompares(title), this.cleanAuthorForCompares(author), isbn, asin, options) + return this.search(provider, cleanedTitle, cleanedAuthor, isbn, asin, options) } if (["google", "audible", "itunes"].includes(provider)) return books