tests and comments: invented names for real songs and artists the sweep found (#8209)
release / go (push) Successful in 1m57s
release / web (push) Successful in 1m8s
release / integration (push) Successful in 2m42s
release / govulncheck (push) Successful in 20s
release / android (push) Successful in 1m53s
release / Build signed APK (push) Successful in 1m43s
release / Build + push container image (push) Successful in 24s
release / go (push) Successful in 1m57s
release / web (push) Successful in 1m8s
release / integration (push) Successful in 2m42s
release / govulncheck (push) Successful in 20s
release / android (push) Successful in 1m53s
release / Build signed APK (push) Successful in 1m43s
release / Build + push container image (push) Successful in 24s
The Title Case sweep of the export found real song titles and artists in fixtures and comments: three songs from one real album, a real song in a release fixture, real artists in a tag test, a link test and a genre test, a real song as a notification example, and a count from a real folder. Each is now invented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -168,7 +168,7 @@ var genreAcronyms = map[string]string{
|
||||
// how "Children's Music" became "Children'S Music".
|
||||
//
|
||||
// Deliberately a fixed list rather than "lowercase whatever follows an
|
||||
// apostrophe": that broader rule would break "O'Brien" and "D'Angelo", which
|
||||
// apostrophe": that broader rule would break "O'Brien" and "D'Arcy", which
|
||||
// are correctly capitalised after the apostrophe.
|
||||
var contractionSuffixes = map[string]bool{
|
||||
"s": true, "t": true, "re": true, "ll": true, "ve": true, "d": true, "m": true,
|
||||
|
||||
@@ -345,7 +345,7 @@ func TestTrueUpCasing(t *testing.T) {
|
||||
// and must keep their capital — this is why the suffix list is fixed
|
||||
// rather than "lowercase anything after an apostrophe".
|
||||
{"irish surname", "O'Brien Core", "O'Brien Core"},
|
||||
{"french elision", "D'Angelo Soul", "D'Angelo Soul"},
|
||||
{"french elision", "D'Arcy Soul", "D'Arcy Soul"},
|
||||
|
||||
// Ordinary genres pass through untouched. Case is otherwise exposed as
|
||||
// the file says it — "Rock" vs "rock" stays a real distinction.
|
||||
|
||||
@@ -66,8 +66,8 @@ func hashRow(n byte, path string) dbq.FindMissingTrackByAudioHashRow {
|
||||
func audioHash(b byte) []byte { return bytes.Repeat([]byte{b}, 32) }
|
||||
|
||||
const (
|
||||
oldPath = "/music/Lincoln Yard/Minutes to Noon/02 - Bleed It Out.mp3"
|
||||
newPath = "/music/Lincoln Yard/Minutes to Noon/04 - Bleed It Out.mp3"
|
||||
oldPath = "/music/Lincoln Yard/Minutes to Noon/02 - Ring It Out.mp3"
|
||||
newPath = "/music/Lincoln Yard/Minutes to Noon/04 - Ring It Out.mp3"
|
||||
)
|
||||
|
||||
// A new file is adopted as a missing track that moved when its recording MBID
|
||||
|
||||
@@ -216,9 +216,9 @@ func TestScanner_AdoptsMovedFile_Integration(t *testing.T) {
|
||||
|
||||
root := t.TempDir()
|
||||
const movedMBID = "11111111-2222-3333-4444-555555555555"
|
||||
movedFrom := filepath.Join(root, "artistM/albumM/04 - Bleed It Out.mp3")
|
||||
movedFrom := filepath.Join(root, "artistM/albumM/04 - Ring It Out.mp3")
|
||||
writeTestMP3(t, movedFrom, map[string]string{
|
||||
"TIT2": "Bleed It Out", "TPE1": "Artist M", "TALB": "Album M", "TRCK": "4",
|
||||
"TIT2": "Ring It Out", "TPE1": "Artist M", "TALB": "Album M", "TRCK": "4",
|
||||
// dhowden surfaces TXXX as a Comm whose Description is the Picard tag
|
||||
// name; "MusicBrainz Track Id" is mbz.Recording.
|
||||
"TXXX": "MusicBrainz Track Id\x00" + movedMBID,
|
||||
@@ -246,7 +246,7 @@ func TestScanner_AdoptsMovedFile_Integration(t *testing.T) {
|
||||
}
|
||||
|
||||
// Renumber the file, exactly as a tag editor would.
|
||||
movedTo := filepath.Join(root, "artistM/albumM/02 - Bleed It Out.mp3")
|
||||
movedTo := filepath.Join(root, "artistM/albumM/02 - Ring It Out.mp3")
|
||||
if err := os.Rename(movedFrom, movedTo); err != nil {
|
||||
t.Fatalf("rename: %v", err)
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ func TestResolveDuplicates_KeepsEveryCopyInACrossReleaseGroup_Integration(t *tes
|
||||
return tr
|
||||
}
|
||||
flac := track("Mammalz", "04 Neptunez Barz.flac", "flac")
|
||||
mp3 := track("Mammalz", "06 Neptunez Barz (feat. Popcaan).mp3", "mp3")
|
||||
mp3 := track("Mammalz", "06 Neptunez Barz (feat. Popkern).mp3", "mp3")
|
||||
single := track("Neptunez Barz", "01 Neptunez Barz.mp3", "mp3")
|
||||
var groupID pgtype.UUID
|
||||
if err := pool.QueryRow(ctx,
|
||||
|
||||
Reference in New Issue
Block a user