mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-27 00:59:14 +01:00
Use region for author queries
This commit is contained in:
parent
2ae3ea346f
commit
a3e63e03d2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user