Parse current time as float

This commit is contained in:
Rasmus Krämer 2022-04-15 12:59:42 +02:00
parent 09dd90e3fc
commit e9249430c3
No known key found for this signature in database
GPG Key ID: EC9E510611BFDAA2
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 += Number.parseInt(timeListened)
this.timeListening += Number.parseFloat(timeListened)
this.updatedAt = Date.now()
}