mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-09 13:29:37 +00:00
Client: Use new server providers API
This commit is contained in:
parent
1da3ab7fdc
commit
ce4ff4f894
10 changed files with 90 additions and 124 deletions
|
|
@ -371,11 +371,25 @@ export default {
|
|||
},
|
||||
customMetadataProviderAdded(provider) {
|
||||
if (!provider?.id) return
|
||||
this.$store.commit('scanners/addCustomMetadataProvider', provider)
|
||||
// Refetch the appropriate provider types
|
||||
if (provider.mediaType === 'book') {
|
||||
this.$store.dispatch('scanners/fetchBookProviders')
|
||||
this.$store.dispatch('scanners/fetchBookCoverProviders')
|
||||
} else if (provider.mediaType === 'podcast') {
|
||||
this.$store.dispatch('scanners/fetchPodcastProviders')
|
||||
this.$store.dispatch('scanners/fetchPodcastCoverProviders')
|
||||
}
|
||||
},
|
||||
customMetadataProviderRemoved(provider) {
|
||||
if (!provider?.id) return
|
||||
this.$store.commit('scanners/removeCustomMetadataProvider', provider)
|
||||
// Refetch the appropriate provider types
|
||||
if (provider.mediaType === 'book') {
|
||||
this.$store.dispatch('scanners/fetchBookProviders')
|
||||
this.$store.dispatch('scanners/fetchBookCoverProviders')
|
||||
} else if (provider.mediaType === 'podcast') {
|
||||
this.$store.dispatch('scanners/fetchPodcastProviders')
|
||||
this.$store.dispatch('scanners/fetchPodcastCoverProviders')
|
||||
}
|
||||
},
|
||||
initializeSocket() {
|
||||
if (this.$root.socket) {
|
||||
|
|
@ -612,6 +626,12 @@ export default {
|
|||
|
||||
this.$store.dispatch('libraries/load')
|
||||
|
||||
// Fetch metadata providers
|
||||
this.$store.dispatch('scanners/fetchBookProviders')
|
||||
this.$store.dispatch('scanners/fetchBookCoverProviders')
|
||||
this.$store.dispatch('scanners/fetchPodcastProviders')
|
||||
this.$store.dispatch('scanners/fetchPodcastCoverProviders')
|
||||
|
||||
this.initLocalStorage()
|
||||
|
||||
this.checkVersionUpdate()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue