Update book finder and cover matching - includes LibGen provider

This commit is contained in:
Mark Cooper 2021-08-21 09:15:44 -05:00
parent be7e2576f1
commit 30700c1eb0
14 changed files with 379 additions and 76 deletions

View file

@ -34,7 +34,9 @@ export default {
if (newVal) {
if (this.audiobook && this.audiobook.id === this.selectedAudiobookId) return
this.audiobook = null
this.fetchFull()
this.init()
} else {
this.$store.commit('audiobooks/removeListener', 'edit-modal')
}
}
}
@ -72,6 +74,13 @@ export default {
selectTab(tab) {
this.selectedTab = tab
},
audiobookUpdated() {
this.fetchFull()
},
init() {
this.$store.commit('audiobooks/addListener', { meth: this.audiobookUpdated, id: 'edit-modal', audiobookId: this.selectedAudiobookId })
this.fetchFull()
},
async fetchFull() {
try {
this.audiobook = await this.$axios.$get(`/api/audiobook/${this.selectedAudiobookId}`)