mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-07-29 07:58:43 +02:00
Merge
This commit is contained in:
+8
-1
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user