mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-29 04:00:32 +02:00
Fix:Library scan toasts
This commit is contained in:
parent
85946dd1d5
commit
228d9cc301
4 changed files with 37 additions and 10 deletions
|
@ -73,10 +73,26 @@ export default {
|
|||
this.$emit('edit', this.library)
|
||||
},
|
||||
scan() {
|
||||
this.$store.dispatch('libraries/requestLibraryScan', { libraryId: this.library.id })
|
||||
this.$store
|
||||
.dispatch('libraries/requestLibraryScan', { libraryId: this.library.id })
|
||||
.then(() => {
|
||||
this.$toast.success('Library scan started')
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Failed to start scan', error)
|
||||
this.$toast.error('Failed to start scan')
|
||||
})
|
||||
},
|
||||
forceScan() {
|
||||
this.$store.dispatch('libraries/requestLibraryScan', { libraryId: this.library.id, force: 1 })
|
||||
this.$store
|
||||
.dispatch('libraries/requestLibraryScan', { libraryId: this.library.id, force: 1 })
|
||||
.then(() => {
|
||||
this.$toast.success('Library scan started')
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Failed to start scan', error)
|
||||
this.$toast.error('Failed to start scan')
|
||||
})
|
||||
},
|
||||
deleteClick() {
|
||||
if (this.isMain) return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue