Add: Filter and side rail button to show books with issues #132, Add: realtime updates for audiobook progress

This commit is contained in:
advplyr 2021-10-24 15:53:51 -05:00
parent 874c910e24
commit 335bbac81d
14 changed files with 96 additions and 30 deletions

View file

@ -153,8 +153,15 @@ class StreamManager {
Logger.error('Invalid User for client', client)
return
}
client.user.updateAudiobookProgressFromStream(client.stream)
var userAudiobook = client.user.updateAudiobookProgressFromStream(client.stream)
this.db.updateEntity('user', client.user)
if (userAudiobook) {
socket.emit('current_user_audiobook_update', {
id: userAudiobook.audiobookId,
data: userAudiobook.toJSON()
})
}
}
}
module.exports = StreamManager