mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-06 03:49:40 +00:00
Remove providers prefetch, refresh on custom provider add/remove
This commit is contained in:
parent
816a47a4ba
commit
166e0442a0
1 changed files with 4 additions and 22 deletions
|
|
@ -371,25 +371,13 @@ export default {
|
||||||
},
|
},
|
||||||
customMetadataProviderAdded(provider) {
|
customMetadataProviderAdded(provider) {
|
||||||
if (!provider?.id) return
|
if (!provider?.id) return
|
||||||
// Refetch the appropriate provider types
|
// Refresh providers cache
|
||||||
if (provider.mediaType === 'book') {
|
this.$store.dispatch('scanners/refreshProviders')
|
||||||
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) {
|
customMetadataProviderRemoved(provider) {
|
||||||
if (!provider?.id) return
|
if (!provider?.id) return
|
||||||
// Refetch the appropriate provider types
|
// Refresh providers cache
|
||||||
if (provider.mediaType === 'book') {
|
this.$store.dispatch('scanners/refreshProviders')
|
||||||
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() {
|
initializeSocket() {
|
||||||
if (this.$root.socket) {
|
if (this.$root.socket) {
|
||||||
|
|
@ -626,12 +614,6 @@ export default {
|
||||||
|
|
||||||
this.$store.dispatch('libraries/load')
|
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.initLocalStorage()
|
||||||
|
|
||||||
this.checkVersionUpdate()
|
this.checkVersionUpdate()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue