mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Merge pull request #461 from rasmuslos/master
Convert timeListened to float
This commit is contained in:
commit
bd5e865a11
@ -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 += timeListened
|
||||
this.timeListening += Number.parseFloat(timeListened)
|
||||
this.updatedAt = Date.now()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user