mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-02 21:44:56 +02:00
Merge branch 'master' into playlists
This commit is contained in:
commit
7aa0ddb71f
33 changed files with 601 additions and 523 deletions
17
server/Db.js
17
server/Db.js
|
@ -270,23 +270,6 @@ class Db {
|
|||
})
|
||||
}
|
||||
|
||||
updateUserStream(userId, streamId) {
|
||||
return this.usersDb.update((record) => record.id === userId, (user) => {
|
||||
user.stream = streamId
|
||||
return user
|
||||
}).then((results) => {
|
||||
Logger.debug(`[DB] Updated user ${results.updated}`)
|
||||
this.users = this.users.map(u => {
|
||||
if (u.id === userId) {
|
||||
u.stream = streamId
|
||||
}
|
||||
return u
|
||||
})
|
||||
}).catch((error) => {
|
||||
Logger.error(`[DB] Update user Failed ${error}`)
|
||||
})
|
||||
}
|
||||
|
||||
updateServerSettings() {
|
||||
global.ServerSettings = this.serverSettings.toJSON()
|
||||
return this.updateEntity('settings', this.serverSettings)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue