From cdcfd01da2cdf656c366b2690b14ff95d5df0a44 Mon Sep 17 00:00:00 2001 From: Selfhost Alt Date: Sat, 16 Apr 2022 11:55:58 -0700 Subject: [PATCH] Only consider an Audible ASIN query successful if the response contains an author --- server/providers/Audible.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/providers/Audible.js b/server/providers/Audible.js index cd4afff3..47ba06a0 100644 --- a/server/providers/Audible.js +++ b/server/providers/Audible.js @@ -50,7 +50,7 @@ class Audible { var url = `https://api.audible.com/1.0/catalog/products/${asin}?${queryString}` Logger.debug(`[Audible] ASIN url: ${url}`) return axios.get(url).then((res) => { - if (!res || !res.data || !res.data.product) return [] + if (!res || !res.data || !res.data.product || !res.data.product.authors) return [] return [res.data.product] }).catch(error => { Logger.error('[Audible] search error', error)