Duplicates and video rips resolve themselves (M498) #155

Merged
bvandeusen merged 5 commits from dev into main 2026-10-08 22:30:10 -04:00
3 changed files with 17 additions and 4 deletions
Showing only changes of commit d59b7fdc2a - Show all commits
+10
View File
@@ -0,0 +1,10 @@
package playlists
// Bridges for the external playlists_test package, whose integration helpers
// (newPool, seedTrack) live there.
// RankedCandidate is rankedCandidate, for tests.
type RankedCandidate = rankedCandidate
// OneCopyPerSong is oneCopyPerSong, for tests.
var OneCopyPerSong = oneCopyPerSong
+4 -3
View File
@@ -1,4 +1,4 @@
package playlists
package playlists_test
import (
"context"
@@ -7,6 +7,7 @@ import (
"github.com/jackc/pgx/v5/pgtype"
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
"git.fabledsword.com/bvandeusen/minstrel/internal/playlists"
)
// A mix holds a song once (M498 #5438) and never a held-back video rip
@@ -30,10 +31,10 @@ func TestOneCopyPerSong_Integration(t *testing.T) {
t.Fatal(err)
}
in := []rankedCandidate{
in := []playlists.RankedCandidate{
{TrackID: single.ID}, {TrackID: rip.ID}, {TrackID: albumCut.ID}, {TrackID: other.ID}, {TrackID: clean.ID},
}
out, err := oneCopyPerSong(ctx, q, in)
out, err := playlists.OneCopyPerSong(ctx, q, in)
if err != nil {
t.Fatal(err)
}
@@ -14,7 +14,9 @@ function track(id: string): AdminSuspectTrack {
duration_sec: 180,
disc_number: null,
track_number: null,
markers: []
markers: [],
verdict: null,
verdict_at: null
};
}