mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-02 20:19:10 +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}`
|
var url = `https://api.audible.com/1.0/catalog/products/${asin}?${queryString}`
|
||||||
Logger.debug(`[Audible] ASIN url: ${url}`)
|
Logger.debug(`[Audible] ASIN url: ${url}`)
|
||||||
return axios.get(url).then((res) => {
|
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]
|
return [res.data.product]
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
Logger.error('[Audible] search error', error)
|
Logger.error('[Audible] search error', error)
|
||||||
|
Loading…
Reference in New Issue
Block a user