feat: a version named after a dash counts as a version, and a song held twice beside a wrong slot no longer blocks it (M498)
release / govulncheck (push) Successful in 25s
release / web (push) Successful in 1m22s
release / go (push) Successful in 1m31s
release / android (push) Successful in 4m51s
release / integration (push) Successful in 4m53s
release / Build signed APK (releases and dev) (push) Successful in 5m0s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 17s
release / Verify release artifacts (tag releases only) (push) Skipped
release / govulncheck (push) Successful in 25s
release / web (push) Successful in 1m22s
release / go (push) Successful in 1m31s
release / android (push) Successful in 4m51s
release / integration (push) Successful in 4m53s
release / Build signed APK (releases and dev) (push) Successful in 5m0s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 17s
release / Verify release artifacts (tag releases only) (push) Skipped
- songKey drops a dashed version suffix (" - Instrumental Version", " - Radio
Edit", live, remix, mix, acoustic, demo, reprise, rework, VIP), so Andora's
"Goodbye Yesterday - Instrumental Version" is distinct, not a wrong slot.
- wrongSlots accepts several fitting copies when they share one title
(Killjoy twice beside Dreamland): the other slot's copy is removed, and the
doubled song is left for the next sweep to find as a pair the resolver merges.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -85,11 +85,18 @@ func ClassifyDuplicateGroup(tier string, members []ClassifyMember) DuplicateClas
|
||||
}
|
||||
}
|
||||
|
||||
// songKey is MatchTitleKey with every bracketed segment dropped: the song a
|
||||
// title names, whatever version of it. "Lovesick (Instrumental)" and
|
||||
// "Lovesick" share one.
|
||||
// versionSuffix is a version named after a dash rather than in brackets:
|
||||
// "Goodbye Yesterday - Instrumental Version", "Song - Radio Edit".
|
||||
var versionSuffix = regexp.MustCompile(
|
||||
`(?i)\s-\s[^-]*\b(version|instrumental|remix|mix|live|acoustic|demo|edit|reprise|rework|vip)\b[^-]*$`)
|
||||
|
||||
// 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"
|
||||
// share one.
|
||||
func songKey(title, artist string) string {
|
||||
if key := MatchTitleKey(bracketed.ReplaceAllString(title, " "), artist); key != "" {
|
||||
t := versionSuffix.ReplaceAllString(bracketed.ReplaceAllString(title, " "), "")
|
||||
if key := MatchTitleKey(t, artist); key != "" {
|
||||
return key
|
||||
}
|
||||
return MatchTitleKey(title, artist)
|
||||
|
||||
Reference in New Issue
Block a user