Merge pull request #4750 from mikiher/providers-api

Add metadata providers API and use them on web client
This commit is contained in:
advplyr 2025-10-21 17:24:11 -05:00 committed by GitHub
commit a92ba564bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 361 additions and 210 deletions

View file

@ -247,7 +247,8 @@ export default {
return this.$store.state.serverSettings
},
providers() {
return this.$store.state.scanners.providers
// Use book cover providers for the cover provider dropdown
return this.$store.state.scanners.bookCoverProviders || []
},
dateFormats() {
return this.$store.state.globals.dateFormats
@ -416,6 +417,8 @@ export default {
},
mounted() {
this.initServerSettings()
// Fetch providers if not already loaded (for cover provider dropdown)
this.$store.dispatch('scanners/fetchProviders')
}
}
</script>

View file

@ -155,7 +155,7 @@ export default {
},
providers() {
if (this.selectedLibraryIsPodcast) return this.$store.state.scanners.podcastProviders
return this.$store.state.scanners.providers
return this.$store.state.scanners.bookProviders
},
canFetchMetadata() {
return !this.selectedLibraryIsPodcast && this.fetchMetadata.enabled
@ -394,6 +394,8 @@ export default {
this.setMetadataProvider()
this.setDefaultFolder()
// Fetch providers if not already loaded
this.$store.dispatch('scanners/fetchProviders')
window.addEventListener('dragenter', this.dragenter)
window.addEventListener('dragleave', this.dragleave)
window.addEventListener('dragover', this.dragover)