test: invented artists, albums and MusicBrainz ids in place of real ones
release / web (push) Failing after 1m16s
release / go (push) Successful in 1m48s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m0s
release / android (push) Successful in 4m34s
release / Build signed APK (push) Successful in 5m9s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped

Test data and example comments named real artists, records and songs, and
carried real MusicBrainz ids. One mapping swaps them for invented ones
throughout (Fields of Ontario, Plastic Apes, Marlo Davies, ...), keeping
what each case tests: sort order, index letter, escaping, title keys,
artist-prefix stripping. A test username is no longer the operator's name.

The cover-art and Last.fm connection checks still query real releases;
they reach live services and need something that exists there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 13:21:34 -05:00
co-authored by Claude Opus 5.5
parent 4244d81dfd
commit 4e1807cbba
80 changed files with 570 additions and 570 deletions
+8 -8
View File
@@ -17,13 +17,13 @@ import (
// a song once, so the extra copies are the ones to fold away.
// - cross_release: the copies are on different albums. A single and the
// album it came from, a deluxe edition and the standard one, or one
// recording a later release retitled ("The Ragtime Cat", "F.O.D. (live)",
// recording a later release retitled ("The Ragtime Cat", "F.O.E. (live)",
// a romanized title): each copy belongs to its own release, so none is
// deleted (unless it is a video rip; the resolver decides). Copies under
// different titles on different releases are retitles, not different
// songs.
// - distinct: one album, two versions of a song that sound alike, named as
// such ("Lovesick", "Lovesick (Instrumental)"). Not duplicates.
// such ("Homesick", "Homesick (Instrumental)"). Not duplicates.
// - mismatch: one album holds the same audio under different song titles:
// one file filling several track slots, a broken download. Which slot is
// right is the resolver's to decide from MusicBrainz's track lengths.
@@ -54,7 +54,7 @@ type ClassifyMember struct {
// adds to a title (featuring credits, remaster notes, video markers) and keeps
// what names a different recording (live, demo, remix, instrumental). On one
// album, titles that differ only by such a word are two versions (distinct)
// unless the bytes are identical, which is one file twice: "WWW" and "WWW
// unless the bytes are identical, which is one file twice: "XYZ" and "XYZ
// (instrumental)" holding the same file is a wrong slot.
func ClassifyDuplicateGroup(tier string, members []ClassifyMember) DuplicateClass {
if len(members) < 2 {
@@ -98,8 +98,8 @@ var versionWord = regexp.MustCompile(
// versionWords lists, sorted and lowercased, the version words in a copy's
// title and file name together. Two copies holding one title tag can still be
// two versions, told apart only by the file name: "Suite-Pee" and
// "Suite-Pee (Clean Version)", "Luv (sic) Grand Finale" and its instrumental.
// two versions, told apart only by the file name: "Suite-Tea" and
// "Suite-Tea (Clean Version)", "Hush (sic) Grand Finale" and its instrumental.
func versionWords(title, path string) string {
seen := map[string]bool{}
name := strings.TrimSuffix(filepath.Base(path), filepath.Ext(path))
@@ -123,7 +123,7 @@ func versionWords(title, path string) string {
// songKey is MatchTitleKey with every bracketed segment and a dashed version
// suffix dropped: the song a title names, whatever version of it.
// "Lovesick (Instrumental)", "Lovesick - Instrumental Version" and "Lovesick"
// "Homesick (Instrumental)", "Homesick - Instrumental Version" and "Homesick"
// share one.
func songKey(title, artist string) string {
t := versionSuffix.ReplaceAllString(bracketed.ReplaceAllString(title, " "), "")
@@ -134,9 +134,9 @@ func songKey(title, artist string) string {
}
var (
// A bracketed credit: "(feat. Panda Bear)", "[ft. X]", "(featuring Y)".
// A bracketed credit: "(feat. Koala Bear)", "[ft. X]", "(featuring Y)".
featBracket = regexp.MustCompile(`(?i)[(\[][^)\]]*\b(feat\.?|ft\.?|featuring)\s[^)\]]*[)\]]`)
// A credit trailing the title without brackets: "Doin' It Right ft. Panda
// A credit trailing the title without brackets: "Doin' It Twice ft. Panda
// Bear".
featTrailing = regexp.MustCompile(`(?i)\s(feat\.?|ft\.?|featuring)\s.*$`)
// "(2011 Remaster)", "[Remastered]", "- Remastered 2009".