From 7602d374a9f328abb2df925f59bfdf5b0f2e5273 Mon Sep 17 00:00:00 2001 From: Scott Bartuska Date: Sat, 4 Jun 2022 15:56:25 -0700 Subject: [PATCH] Update Bookfinder.js : getAudibleResults : remove (unabridged) cleantitle for search in audible as (unabridged) doesn't find anything --- server/finders/BookFinder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/finders/BookFinder.js b/server/finders/BookFinder.js index 60b39838a..161174a35 100644 --- a/server/finders/BookFinder.js +++ b/server/finders/BookFinder.js @@ -167,7 +167,9 @@ class BookFinder { } async getAudibleResults(title, author, asin) { - var books = await this.audible.search(title, author, asin); + // cleantitle for search in audible as (unabridged) doesn't find anything + var cleanedTitle = title.replace(/ *\([^)]*\) */g, "") + var books = await this.audible.search(cleanedTitle, author, asin); if (this.verbose) Logger.debug(`Audible Book Search Results: ${books.length || 0}`) if (!books) return [] return books @@ -233,4 +235,4 @@ class BookFinder { return this.audnexus.getChaptersByASIN(asin) } } -module.exports = BookFinder \ No newline at end of file +module.exports = BookFinder