mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-05 23:49:41 +00:00
Use library default provider in Match/Cover dialogs
This commit is contained in:
parent
ff884f1135
commit
8d687cbce9
3 changed files with 34 additions and 35 deletions
|
|
@ -381,20 +381,12 @@ export default {
|
|||
checkboxToggled() {
|
||||
this.selectAll = Object.values(this.selectedMatchUsage).findIndex((v) => v == false) < 0
|
||||
},
|
||||
persistProvider() {
|
||||
try {
|
||||
localStorage.setItem('book-provider', this.provider)
|
||||
} catch (error) {
|
||||
console.error('PersistProvider', error)
|
||||
}
|
||||
},
|
||||
getDefaultBookProvider() {
|
||||
let provider = localStorage.getItem('book-provider')
|
||||
if (!provider) return 'google'
|
||||
const provider = this.$store.getters['libraries/getLibraryProvider'](this.libraryItem.libraryId) || 'google'
|
||||
|
||||
// Validate book provider
|
||||
if (!this.$store.getters['scanners/checkBookProviderExists'](provider)) {
|
||||
console.error('Stored book provider does not exist', provider)
|
||||
localStorage.removeItem('book-provider')
|
||||
console.error('Library default book provider does not exist', provider)
|
||||
return 'google'
|
||||
}
|
||||
return provider
|
||||
|
|
@ -411,9 +403,6 @@ export default {
|
|||
this.$toast.warning(this.$strings.ToastTitleRequired)
|
||||
return
|
||||
}
|
||||
if (!this.isPodcast) {
|
||||
this.persistProvider()
|
||||
}
|
||||
this.runSearch()
|
||||
},
|
||||
async runSearch() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue