mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-02 01:05:25 +02:00
Fix:Local playback session store date/dayOfWeek string to be used in stats
This commit is contained in:
parent
caea6c6371
commit
c6323f8ad9
3 changed files with 9 additions and 6 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue