mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-12-02 21:24:08 +01:00
Fix:Local playback session store date/dayOfWeek string to be used in stats
This commit is contained in:
1 parent
caea6c6371
commit
c6323f8ad9
3 files changed
+9
-6
No files matched your search
@@ -1,4 +1,5 @@
|
||||
const Path = require('path')
|
||||
const date = require('date-and-time')
|
||||
const { PlayMethod } = require('../utils/constants')
|
||||
const PlaybackSession = require('../objects/PlaybackSession')
|
||||
const Stream = require('../objects/Stream')
|
||||
@@ -53,6 +54,8 @@ class PlaybackSessionManager {
|
||||
} else {
|
||||
session.timeListening = sessionJson.timeListening
|
||||
session.updatedAt = sessionJson.updatedAt
|
||||
session.date = date.format(new Date(), 'YYYY-MM-DD')
|
||||
session.dayOfWeek = date.format(new Date(), 'dddd')
|
||||
await this.db.updateEntity('session', session)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user