mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-02 20:19:10 +01:00
Parse current time as float
This commit is contained in:
parent
09dd90e3fc
commit
e9249430c3
@ -82,7 +82,7 @@ class PlaybackSessionManager {
|
||||
|
||||
const userProgress = user.getMediaProgress(libraryItem.id, episodeId)
|
||||
var userStartTime = 0
|
||||
if (userProgress) userStartTime = userProgress.currentTime || 0
|
||||
if (userProgress) userStartTime = Number.parseFloat(userProgress.currentTime) || 0
|
||||
const newPlaybackSession = new PlaybackSession()
|
||||
newPlaybackSession.setData(libraryItem, user, mediaPlayer, episodeId)
|
||||
|
||||
|
@ -158,7 +158,7 @@ class PlaybackSession {
|
||||
this.dayOfWeek = date.format(new Date(), 'dddd')
|
||||
}
|
||||
|
||||
this.timeListening += Number.parseInt(timeListened)
|
||||
this.timeListening += Number.parseFloat(timeListened)
|
||||
this.updatedAt = Date.now()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user