Duplicates and video rips resolve themselves (M498) #155
@@ -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
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package playlists
|
package playlists_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"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
|
// 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)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
in := []rankedCandidate{
|
in := []playlists.RankedCandidate{
|
||||||
{TrackID: single.ID}, {TrackID: rip.ID}, {TrackID: albumCut.ID}, {TrackID: other.ID}, {TrackID: clean.ID},
|
{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 {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ function track(id: string): AdminSuspectTrack {
|
|||||||
duration_sec: 180,
|
duration_sec: 180,
|
||||||
disc_number: null,
|
disc_number: null,
|
||||||
track_number: null,
|
track_number: null,
|
||||||
markers: []
|
markers: [],
|
||||||
|
verdict: null,
|
||||||
|
verdict_at: null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user