Minor code cleanup when creation time.Duration

This commit is contained in:
Philipp Wolfer 2025-05-25 15:53:01 +02:00
parent 78a05e9f54
commit 0115eca1c6
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
5 changed files with 5 additions and 5 deletions

View file

@ -89,7 +89,7 @@ func (i HistoryItem) AsListen() models.Listen {
AdditionalInfo: models.AdditionalInfo{},
},
ListenedAt: i.Timestamp,
PlaybackDuration: time.Duration(i.MillisecondsPlayed * int(time.Millisecond)),
PlaybackDuration: time.Duration(i.MillisecondsPlayed) * time.Millisecond,
UserName: i.UserName,
}
if trackURL, err := formatSpotifyUri(i.SpotifyTrackUri); err != nil {