From 661778c02c8e51ce9a431e6c335d084ee4b6fc3d Mon Sep 17 00:00:00 2001 From: jmt-gh <13617455+jmt-gh@users.noreply.github.com> Date: Wed, 29 Jun 2022 19:18:00 -0700 Subject: [PATCH 1/3] Await the response from audible for book search by ASIN --- server/finders/BookFinder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/finders/BookFinder.js b/server/finders/BookFinder.js index d893cd3f..738e0f72 100644 --- a/server/finders/BookFinder.js +++ b/server/finders/BookFinder.js @@ -182,7 +182,7 @@ class BookFinder { if (provider === 'google') { books = this.getGoogleBooksResults(title, author) } else if (provider === 'audible') { - books = this.getAudibleResults(title, author, asin) + books = await this.getAudibleResults(title, author, asin) } else if (provider === 'itunes') { books = this.getiTunesAudiobooksResults(title, author) } else if (provider === 'libgen') { From b0684b6f1b7aa065bdffdad3a10657f4350b9562 Mon Sep 17 00:00:00 2001 From: jmt-gh <13617455+jmt-gh@users.noreply.github.com> Date: Wed, 29 Jun 2022 19:19:58 -0700 Subject: [PATCH 2/3] Await the responses from googlebooks and itunes --- server/finders/BookFinder.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/finders/BookFinder.js b/server/finders/BookFinder.js index 738e0f72..c102e442 100644 --- a/server/finders/BookFinder.js +++ b/server/finders/BookFinder.js @@ -180,11 +180,12 @@ class BookFinder { Logger.debug(`Book Search: title: "${title}", author: "${author}", provider: ${provider}`) if (provider === 'google') { - books = this.getGoogleBooksResults(title, author) + books = await + this.getGoogleBooksResults(title, author) } else if (provider === 'audible') { books = await this.getAudibleResults(title, author, asin) } else if (provider === 'itunes') { - books = this.getiTunesAudiobooksResults(title, author) + books = await this.getiTunesAudiobooksResults(title, author) } else if (provider === 'libgen') { books = await this.getLibGenResults(title, author, maxTitleDistance, maxAuthorDistance) } else if (provider === 'openlibrary') { From 67396c16ddedc033a6eaffe5798a1714239f505c Mon Sep 17 00:00:00 2001 From: jmt-gh <13617455+jmt-gh@users.noreply.github.com> Date: Wed, 29 Jun 2022 19:25:59 -0700 Subject: [PATCH 3/3] formatting update --- server/finders/BookFinder.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/finders/BookFinder.js b/server/finders/BookFinder.js index c102e442..db980976 100644 --- a/server/finders/BookFinder.js +++ b/server/finders/BookFinder.js @@ -180,8 +180,7 @@ class BookFinder { Logger.debug(`Book Search: title: "${title}", author: "${author}", provider: ${provider}`) if (provider === 'google') { - books = await - this.getGoogleBooksResults(title, author) + books = await this.getGoogleBooksResults(title, author) } else if (provider === 'audible') { books = await this.getAudibleResults(title, author, asin) } else if (provider === 'itunes') {