Fixed progress for subsonic loves export

This commit is contained in:
Philipp Wolfer 2025-04-27 13:26:47 +02:00
parent 1ea90d2d2b
commit 01e7569051
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B

View file

@ -78,8 +78,11 @@ func (b *SubsonicApiBackend) ExportLoves(oldestTimestamp time.Time, results chan
return
}
progress <- models.Progress{Elapsed: int64(len(starred.Song))}.Complete()
results <- models.LovesResult{Items: b.filterSongs(starred.Song, oldestTimestamp)}
loves := b.filterSongs(starred.Song, oldestTimestamp)
progress <- models.Progress{
Total: int64(loves.Len()),
}.Complete()
results <- models.LovesResult{Items: loves}
}
func (b *SubsonicApiBackend) filterSongs(songs []*subsonic.Child, oldestTimestamp time.Time) models.LovesList {