feat: Minstrel stops acquiring music and drops Discover
release / go (push) Successful in 1m54s
release / web (push) Failing after 5s
release / integration (push) Failing after 3m44s
release / govulncheck (push) Successful in 20s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 19s
release / android (push) Canceled after 2m37s

Minstrel is now a viewer of the library it is pointed at. Finding,
downloading and filing music moves out of it.

Removed from the server:
- the request flow (requests, approval, auto-approve) and the wanted list,
  follows, release profiles and release blocks;
- searching indexers, the download clients, the importer, the album
  lifecycle and missing-file re-acquisition;
- the catalogue's discography, search and art (the MusicBrainz release and
  track-list cache stays, for the duplicate resolver);
- Discover: its suggestions of artists not in the library, snoozes, the
  candidate-artist tag enrichment and its tuning scope;
- writes to acquisition tables from moving the library folder and from
  merging duplicates, the want-list join on Suspect sources, the sealing of
  acquisition credentials, and the release-group lookup only
  re-acquisition used.

Settling a wrong-slot duplicate no longer sets the release aside: the
copies go and their slots show as missing until a good copy is in the
library.

Removed from the web: Admin > Acquisition and Requests, /requests,
/discover, Follow on the artist page, the auto-approve toggle, and the
Collection's wanted-list tabs. The Collection is now the library's health:
an overview, Reports, Duplicates, Suspect sources and Missing files. The
README and docs no longer describe getting music.

The tables stay for now; a later migration drops them. The request
notification kinds and the Android screens are still to go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 20:51:14 -05:00
co-authored by Claude Opus 5.5
parent dabe1e052d
commit 55c7497ca7
277 changed files with 521 additions and 40021 deletions
+10 -32
View File
@@ -379,7 +379,7 @@ func seedTrackList(t *testing.T, pool *pgxpool.Pool, album dbq.Album, songs map[
// One recording in two slots of an album: MusicBrainz says Void is as long as
// the file and Reach is a minute longer, so the copy in Reach's slot goes. Its
// track stays, marked missing, for the album to be fetched again.
// track stays, marked missing, until a good copy arrives.
func TestResolveDuplicates_RemovesACopyFromAnotherSongsSlot_Integration(t *testing.T) {
f := newOneAlbumFixture(t, "acoustic", "Void", "Reach")
seedTrackList(t, f.pool, f.album, map[string]int{"Void": 220500, "Reach": 281000})
@@ -420,7 +420,7 @@ func TestResolveDuplicates_RemovesACopyFromAnotherSongsSlot_Integration(t *testi
// A slot emptied of another song's file folds into a copy of its own song the
// album already holds (Savant's VOID DLC "Weeper" beside Void's). A copy under
// the title that is not as long as the song is another song: the slot waits for
// a copy fetched again, and folds into that.
// a good copy, and folds into that.
func TestResolveDuplicates_EmptiedSlotFoldsOnlyIntoItsOwnSong_Integration(t *testing.T) {
for _, tc := range []struct {
name string
@@ -488,40 +488,21 @@ func TestResolveDuplicates_RemovesEveryCopyWhenNoSlotIsTheirs_Integration(t *tes
// seedTrimmedAlbum is newOneAlbumFixture for one recording cut to both its
// slots' lengths: identical audio, as Tormentor and as Record Shop, each as
// long as its own slot's song, and the track list naming each slot's
// recording. The files came from a download Minstrel imported.
// recording.
func seedTrimmedAlbum(t *testing.T) oneAlbumFixture {
t.Helper()
f := newOneAlbumFixture(t, "exact", "Tormentor", "Record Shop")
ctx := context.Background()
seedTrackList(t, f.pool, f.album, map[string]int{"Tormentor": 221000, "Record Shop": 219000})
for _, stmt := range []struct {
sql string
args []any
}{
{`UPDATE mb_release_tracks SET recording_mbid = 'rec-' || lower(replace(title, ' ', '-'))`, nil},
{`INSERT INTO grabs (info_hash, name, key, client, save_path, origin, import_state, destination)
VALUES ('abc123', 'The Wombats - Void [WEB]', 'k', 'qbit', '/dl', 'schedule', 'imported', $1)`,
[]any{filepath.Dir(f.aPath)}},
} {
if _, err := f.pool.Exec(ctx, stmt.sql, stmt.args...); err != nil {
t.Fatalf("exec %q: %v", stmt.sql, err)
}
if _, err := f.pool.Exec(ctx,
`UPDATE mb_release_tracks SET recording_mbid = 'rec-' || lower(replace(title, ' ', '-'))`); err != nil {
t.Fatal(err)
}
return f
}
func releaseBlocked(t *testing.T, pool *pgxpool.Pool, hash string) bool {
t.Helper()
var n int
if err := pool.QueryRow(context.Background(),
`SELECT count(*) FROM release_blocks WHERE info_hash = $1 AND reason = 'files'`, hash).Scan(&n); err != nil {
t.Fatal(err)
}
return n == 1
}
// AcoustID matched one copy to Tormentor's recording: that copy stays, Record
// Shop's goes, and the download they came from is set aside.
// AcoustID matched one copy to Tormentor's recording: that copy stays and
// Record Shop's goes.
func TestResolveDuplicates_KeepsTheCopyAcoustIDNames_Integration(t *testing.T) {
f := seedTrimmedAlbum(t)
if _, err := f.pool.Exec(context.Background(),
@@ -543,9 +524,6 @@ func TestResolveDuplicates_KeepsTheCopyAcoustIDNames_Integration(t *testing.T) {
t.Fatalf("result %+v, tormentor exists %v, record shop exists %v; want only Record Shop's copy removed",
res, exists(f.aPath), exists(f.bPath))
}
if !releaseBlocked(t, f.pool, "abc123") {
t.Error("the download the files came from was not set aside, so the album would be fetched from it again")
}
}
// Copies whose own lookups all name Record Shop's recording are that
@@ -651,8 +629,8 @@ func TestResolveDuplicates_TrimmedCopiesAcoustIDCannotName_Integration(t *testin
if err != nil {
t.Fatal(err)
}
if res.WrongFiles != 0 || !exists(f.aPath) || !exists(f.bPath) || releaseBlocked(t, f.pool, "abc123") {
t.Fatalf("result %+v; want nothing removed or set aside while AcoustID cannot answer", res)
if res.WrongFiles != 0 || !exists(f.aPath) || !exists(f.bPath) {
t.Fatalf("result %+v; want nothing removed while AcoustID cannot answer", res)
}
if status, _, _, _ := (resolveFixture{pool: f.pool, groupID: f.groupID}).group(t); status != "pending" {
t.Errorf("group = %s, want pending", status)