Merge pull request #461 from rasmuslos/master

Convert timeListened to float
This commit is contained in:
advplyr 2022-04-15 07:58:59 -05:00 committed by GitHub
commit bd5e865a11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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()
}