mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-16 04:14:58 +02:00
Author API requests to use region from library provider
This commit is contained in:
parent
a3e63e03d2
commit
e271e89835
6 changed files with 59 additions and 25 deletions
|
@ -189,6 +189,9 @@ export default {
|
|||
currentLibraryId() {
|
||||
return this.$store.state.libraries.currentLibraryId
|
||||
},
|
||||
libraryProvider() {
|
||||
return this.$store.getters['libraries/getLibraryProvider'](this.currentLibraryId) || 'google'
|
||||
},
|
||||
currentLibraryMediaType() {
|
||||
return this.$store.getters['libraries/getCurrentLibraryMediaType']
|
||||
},
|
||||
|
@ -323,7 +326,11 @@ export default {
|
|||
const payload = {}
|
||||
if (author.asin) payload.asin = author.asin
|
||||
else payload.q = author.name
|
||||
console.log('Payload', payload, 'author', author)
|
||||
|
||||
payload.region = 'us'
|
||||
if (this.libraryProvider.startsWith('audible.')) {
|
||||
payload.region = this.libraryProvider.split('.').pop() || 'us'
|
||||
}
|
||||
|
||||
this.$eventBus.$emit(`searching-author-${author.id}`, true)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue