mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-17 23:01:41 +00:00
Update Bookfinder.js : getAudibleResults : remove (unabridged)
cleantitle for search in audible as (unabridged) doesn't find anything
This commit is contained in:
parent
3d821dacb7
commit
7602d374a9
1 changed files with 4 additions and 2 deletions
|
|
@ -167,7 +167,9 @@ class BookFinder {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAudibleResults(title, author, asin) {
|
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 (this.verbose) Logger.debug(`Audible Book Search Results: ${books.length || 0}`)
|
||||||
if (!books) return []
|
if (!books) return []
|
||||||
return books
|
return books
|
||||||
|
|
@ -233,4 +235,4 @@ class BookFinder {
|
||||||
return this.audnexus.getChaptersByASIN(asin)
|
return this.audnexus.getChaptersByASIN(asin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module.exports = BookFinder
|
module.exports = BookFinder
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue