mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-06-29 08:20:18 +02:00
Merge
This commit is contained in:
parent
ccba8dc3c7
commit
ae195e7b58
32 changed files with 626 additions and 191 deletions
|
@ -46,9 +46,10 @@ class ServerSocket extends EventEmitter {
|
|||
this.socket.on('disconnect', this.onDisconnect.bind(this))
|
||||
this.socket.on('init', this.onInit.bind(this))
|
||||
this.socket.on('user_updated', this.onUserUpdated.bind(this))
|
||||
this.socket.on('user_item_progress_updated', this.onUserItemProgressUpdated.bind(this))
|
||||
|
||||
this.socket.onAny((evt, args) => {
|
||||
console.log(`[SOCKET] ${this.socket.id}: ${evt} ${JSON.stringify(args)}`)
|
||||
console.log(`[SOCKET] onAny: ${this.socket.id}: ${evt} ${JSON.stringify(args)}`)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -84,6 +85,12 @@ class ServerSocket extends EventEmitter {
|
|||
console.log('[SOCKET] User updated', data)
|
||||
this.emit('user_updated', data)
|
||||
}
|
||||
|
||||
onUserItemProgressUpdated(data) {
|
||||
console.log('[SOCKET] User Item Progress Updated', JSON.stringify(data))
|
||||
var progress = data.data
|
||||
this.$store.commit('user/updateUserMediaProgress', progress)
|
||||
}
|
||||
}
|
||||
|
||||
export default ({ app, store }, inject) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue