From 01e7569051f867b7fcf3fc3c19deb4992edb9f71 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Sun, 27 Apr 2025 13:26:47 +0200 Subject: [PATCH] Fixed progress for subsonic loves export --- internal/backends/subsonic/subsonic.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/backends/subsonic/subsonic.go b/internal/backends/subsonic/subsonic.go index 6a59630..ed33214 100644 --- a/internal/backends/subsonic/subsonic.go +++ b/internal/backends/subsonic/subsonic.go @@ -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 {