The first public release of Fabled Minstrel #158

Merged
bvandeusen merged 256 commits from dev into main 2026-12-03 21:41:58 -05:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit d9a20d5e96 - Show all commits
+3 -3
View File
@@ -23,8 +23,8 @@ const docSample = `{
"id": "0a11ce00-0000-4000-8000-000000000008",
"recordings": [{
"duration": 639,
"releasegroups": [{"type": "Album", "id": "0a11ce00-0000-4000-8000-000000000006", "title": "Before the Dusk Finds Us"}],
"title": "Lower Your Voice to Sing With the Moon",
"releasegroups": [{"type": "Album", "id": "0a11ce00-0000-4000-8000-000000000006", "title": "Before the Gulls Wake Up"}],
"title": "Hum Quietly Under the Pier Lamps",
"id": "0a11ce00-0000-4000-8000-000000000005",
"artists": [{"id": "0a11ce00-0000-4000-8000-000000000007", "name": "K47"}]
}]
@@ -55,7 +55,7 @@ func TestParseLookup(t *testing.T) {
}{
{"single match", docSample, []Candidate{{
Recording: Recording{
ID: "0a11ce00-0000-4000-8000-000000000005", Title: "Lower Your Voice to Sing With the Moon",
ID: "0a11ce00-0000-4000-8000-000000000005", Title: "Hum Quietly Under the Pier Lamps",
DurationSec: 639, Artists: []string{"K47"},
},
Score: 1.0,
+1 -1
View File
@@ -136,7 +136,7 @@ func songKey(title, artist string) string {
var (
// 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 Twice ft. Panda
// A credit trailing the title without brackets: "Doin' It Twice ft. Koala
// Bear".
featTrailing = regexp.MustCompile(`(?i)\s(feat\.?|ft\.?|featuring)\s.*$`)
// "(2011 Remaster)", "[Remastered]", "- Remastered 2009".