mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-30 04:25:03 +02:00
Fixes + add progress to m4b and embed tools
This commit is contained in:
parent
b6875a44cf
commit
10f5f331d7
11 changed files with 530 additions and 211 deletions
|
@ -212,6 +212,16 @@ export default {
|
|||
this.libraryItemAdded(ab)
|
||||
})
|
||||
},
|
||||
trackStarted(data) {
|
||||
this.$store.commit('tasks/updateAudioFilesEncoding', { libraryItemId: data.libraryItemId, ino: data.ino, progress: '0%' })
|
||||
},
|
||||
trackProgress(data) {
|
||||
this.$store.commit('tasks/updateAudioFilesEncoding', { libraryItemId: data.libraryItemId, ino: data.ino, progress: `${Math.round(data.progress)}%` })
|
||||
},
|
||||
trackFinished(data) {
|
||||
this.$store.commit('tasks/updateAudioFilesEncoding', { libraryItemId: data.libraryItemId, ino: data.ino, progress: '100%' })
|
||||
this.$store.commit('tasks/updateAudioFilesFinished', { libraryItemId: data.libraryItemId, ino: data.ino, finished: true })
|
||||
},
|
||||
taskStarted(task) {
|
||||
console.log('Task started', task)
|
||||
this.$store.commit('tasks/addUpdateTask', task)
|
||||
|
@ -220,6 +230,9 @@ export default {
|
|||
console.log('Task finished', task)
|
||||
this.$store.commit('tasks/addUpdateTask', task)
|
||||
},
|
||||
taskProgress(data) {
|
||||
this.$store.commit('tasks/updateTaskProgress', { libraryItemId: data.libraryItemId, progress: `${Math.round(data.progress)}%` })
|
||||
},
|
||||
metadataEmbedQueueUpdate(data) {
|
||||
if (data.queued) {
|
||||
this.$store.commit('tasks/addQueuedEmbedLId', data.libraryItemId)
|
||||
|
@ -406,6 +419,10 @@ export default {
|
|||
this.socket.on('task_started', this.taskStarted)
|
||||
this.socket.on('task_finished', this.taskFinished)
|
||||
this.socket.on('metadata_embed_queue_update', this.metadataEmbedQueueUpdate)
|
||||
this.socket.on('track_started', this.trackStarted)
|
||||
this.socket.on('track_finished', this.trackFinished)
|
||||
this.socket.on('track_progress', this.trackProgress)
|
||||
this.socket.on('task_progress', this.taskProgress)
|
||||
|
||||
// EReader Device Listeners
|
||||
this.socket.on('ereader-devices-updated', this.ereaderDevicesUpdated)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue