mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Only consider an Audible ASIN query successful if the response contains an author
This commit is contained in:
parent
d6c5b6e8c6
commit
cdcfd01da2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user