From 2f578004e980074faa5457ddba75b7f94e0075d0 Mon Sep 17 00:00:00 2001 From: Andrew Hampton <58611864+aurokon@users.noreply.github.com> Date: Mon, 5 Dec 2022 12:38:01 -0700 Subject: [PATCH] Update GoogleBooks.js Further updated to check for extraLarge, then fallback to Large then to thumbnail and then to null if not available. --- server/providers/GoogleBooks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/providers/GoogleBooks.js b/server/providers/GoogleBooks.js index 975528ebe..d397a9460 100644 --- a/server/providers/GoogleBooks.js +++ b/server/providers/GoogleBooks.js @@ -25,7 +25,7 @@ class GoogleBooks { publisher, publishedYear: publisherDate ? publisherDate.split('-')[0] : null, description, - cover: imageLinks && imageLinks.thumbnail ? imageLinks.thumbnail : null, + cover: imageLinks && imageLinks.extraLarge ? image.extraLarge : image.imagelarge ? Links.thumbnail ? imageLinks.thumbnail : null, genres: categories && Array.isArray(categories) ? [...categories] : null, isbn: this.extractIsbn(industryIdentifiers) } @@ -51,4 +51,4 @@ class GoogleBooks { } } -module.exports = GoogleBooks \ No newline at end of file +module.exports = GoogleBooks