fix source-aware download tracking and filter/path regressions

Make download dedupe source-specific to prevent cross-provider ID collisions. Also correct non-remaster filtering, avoid FLAC tagging on non-FLAC files, and use album IDs for singles folder templating.
This commit is contained in:
2026-04-19 21:25:04 +02:00
parent 97e8b758b3
commit d4643d877e
6 changed files with 157 additions and 21 deletions

View File

@@ -16,7 +16,7 @@ func TestSQLiteStore(t *testing.T) {
}
defer func() { _ = s.Close() }()
ok, err := s.IsDownloaded(ctx, "a")
ok, err := s.IsDownloaded(ctx, "qobuz", "a")
if err != nil {
t.Fatalf("IsDownloaded() error = %v", err)
}
@@ -24,11 +24,11 @@ func TestSQLiteStore(t *testing.T) {
t.Fatalf("expected not downloaded")
}
if err = s.MarkDownloaded(ctx, "a"); err != nil {
if err = s.MarkDownloaded(ctx, "qobuz", "a"); err != nil {
t.Fatalf("MarkDownloaded() error = %v", err)
}
ok, err = s.IsDownloaded(ctx, "a")
ok, err = s.IsDownloaded(ctx, "qobuz", "a")
if err != nil {
t.Fatalf("IsDownloaded() error = %v", err)
}
@@ -36,6 +36,14 @@ func TestSQLiteStore(t *testing.T) {
t.Fatalf("expected downloaded")
}
ok, err = s.IsDownloaded(ctx, "tidal", "a")
if err != nil {
t.Fatalf("IsDownloaded() error = %v", err)
}
if ok {
t.Fatalf("expected source-specific download tracking")
}
if err = s.MarkFailed(ctx, "qobuz", "track", "1"); err != nil {
t.Fatalf("MarkFailed() error = %v", err)
}