Simplify timestamp comparisons

This commit is contained in:
Philipp Wolfer 2025-05-01 12:27:24 +02:00
parent 389c7c6ec1
commit c305b6c7e3
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
7 changed files with 14 additions and 14 deletions

View file

@ -90,7 +90,7 @@ func (b *SubsonicApiBackend) filterSongs(songs []*subsonic.Child, oldestTimestam
loves := make(models.LovesList, 0, len(songs))
for _, song := range songs {
love := SongAsLove(*song, b.client.User)
if love.Created.Unix() > oldestTimestamp.Unix() {
if love.Created.After(oldestTimestamp) {
loves = append(loves, love)
}
}