mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 18:24:46 +02:00
Switch to using the websocket for confirmation of batch updates, allowing the main request to be done asynchronously
This commit is contained in:
parent
2d6f9bab8b
commit
3e7a76574b
3 changed files with 26 additions and 14 deletions
|
@ -359,6 +359,18 @@ export default {
|
|||
// Force refresh
|
||||
location.reload()
|
||||
},
|
||||
batchQuickMatchComplete(result) {
|
||||
var success = result.success || false
|
||||
var toast = 'Batch quick match complete!\n' + result.updates + ' Updated'
|
||||
if (result.unmatched && (result.unmatched > 0)) {
|
||||
toast += '\n' + result.unmatched + ' with no matches'
|
||||
}
|
||||
if (success) {
|
||||
this.$toast.success(toast)
|
||||
} else {
|
||||
this.$toast.info(toast)
|
||||
}
|
||||
},
|
||||
initializeSocket() {
|
||||
this.socket = this.$nuxtSocket({
|
||||
name: process.env.NODE_ENV === 'development' ? 'dev' : 'prod',
|
||||
|
@ -430,6 +442,8 @@ export default {
|
|||
this.socket.on('rss_feed_closed', this.rssFeedClosed)
|
||||
|
||||
this.socket.on('backup_applied', this.backupApplied)
|
||||
|
||||
this.socket.on('batch_quickmatch_complete', this.batchQuickMatchComplete)
|
||||
},
|
||||
showUpdateToast(versionData) {
|
||||
var ignoreVersion = localStorage.getItem('ignoreVersion')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue