mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-05 02:34:56 +02:00
Updated matching with latest changes, Added override toggle for quickmatch, added asin and isbn to quickmatch query, updated audible provider to use audnexus
This commit is contained in:
parent
f2e16017f6
commit
d15264832d
8 changed files with 192 additions and 98 deletions
|
@ -166,14 +166,14 @@ class BookFinder {
|
|||
return this.iTunesApi.searchAudiobooks(title)
|
||||
}
|
||||
|
||||
async getAudibleResults(title, author) {
|
||||
var books = await this.audible.search(title, author);
|
||||
async getAudibleResults(title, author, asin) {
|
||||
var books = await this.audible.search(title, author, asin);
|
||||
if (this.verbose) Logger.debug(`Audible Book Search Results: ${books.length || 0}`)
|
||||
if (!books) return []
|
||||
return books
|
||||
}
|
||||
|
||||
async search(provider, title, author, options = {}) {
|
||||
async search(provider, title, author, isbn, asin, options = {}) {
|
||||
var books = []
|
||||
var maxTitleDistance = !isNaN(options.titleDistance) ? Number(options.titleDistance) : 4
|
||||
var maxAuthorDistance = !isNaN(options.authorDistance) ? Number(options.authorDistance) : 4
|
||||
|
@ -182,7 +182,7 @@ class BookFinder {
|
|||
if (provider === 'google') {
|
||||
return this.getGoogleBooksResults(title, author)
|
||||
} else if (provider === 'audible') {
|
||||
return this.getAudibleResults(title, author)
|
||||
return this.getAudibleResults(title, author, asin)
|
||||
} else if (provider === 'itunes') {
|
||||
return this.getiTunesAudiobooksResults(title, author)
|
||||
} else if (provider === 'libgen') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue