Fix: audiobook progress emitter emit to all user sockets #145, Fix: save user after progress update

This commit is contained in:
advplyr 2021-10-25 21:14:54 -05:00
parent c5eafdfa8a
commit 8b31c6555a
7 changed files with 30 additions and 14 deletions

View file

@ -1,3 +1,4 @@
const Logger = require('../Logger')
const AudioBookmark = require('./AudioBookmark')
class AudiobookProgress {
@ -79,6 +80,7 @@ class AudiobookProgress {
update(payload) {
var hasUpdates = false
Logger.debug(`[AudiobookProgress] Update called ${JSON.stringify(payload)}`)
for (const key in payload) {
if (payload[key] !== this[key]) {
if (key === 'isRead') {