diff --git a/server/providers/Audnexus.js b/server/providers/Audnexus.js index 43dfb665..5935508e 100644 --- a/server/providers/Audnexus.js +++ b/server/providers/Audnexus.js @@ -9,7 +9,8 @@ class Audnexus { authorASINsRequest(name) { name = encodeURIComponent(name); - return axios.get(`${this.baseUrl}/authors?name=${name}`).then((res) => { + var regionQuery = region ? `®ion=${region}` : '' + return axios.get(`${this.baseUrl}/authors?name=${name}${regionQuery}`).then((res) => { return res.data || [] }).catch((error) => { Logger.error(`[Audnexus] Author ASIN request failed for ${name}`, error) @@ -19,7 +20,8 @@ class Audnexus { authorRequest(asin) { asin = encodeURIComponent(asin); - return axios.get(`${this.baseUrl}/authors/${asin}`).then((res) => { + var regionQuery = region ? `?region=${region}` : '' + return axios.get(`${this.baseUrl}/authors/${asin}${regionQuery}`).then((res) => { return res.data }).catch((error) => { Logger.error(`[Audnexus] Author request failed for ${asin}`, error)