mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-12-01 20:44:12 +01:00
Merge
This commit is contained in:
1 parent
ccba8dc3c7
commit
ae195e7b58
32 files changed
+626
-191
No files matched your search
+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