mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-25 05:47:57 +02:00
subsonic: fixed filtering songs based on timestamp
This commit is contained in:
parent
8a1cd8ded7
commit
a4a05ea047
1 changed files with 3 additions and 3 deletions
|
@ -66,11 +66,11 @@ func (b *SubsonicApiBackend) ExportLoves(oldestTimestamp time.Time, results chan
|
|||
}
|
||||
|
||||
func (b *SubsonicApiBackend) filterSongs(songs []*subsonic.Child, oldestTimestamp time.Time) models.LovesList {
|
||||
loves := make(models.LovesList, len(songs))
|
||||
for i, song := range songs {
|
||||
loves := make(models.LovesList, 0, len(songs))
|
||||
for _, song := range songs {
|
||||
love := SongAsLove(*song, b.client.User)
|
||||
if love.Created.Unix() > oldestTimestamp.Unix() {
|
||||
loves[i] = love
|
||||
loves = append(loves, love)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue