fix(library): split comma-separated main artists
ci / module boundaries / boundaries (push) Successful in 8s
ci / api / api (push) Successful in 1m17s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 1m21s
ci / ts / ts (packages + web) (push) Successful in 3m43s
ci / db / db (push) Canceled after 11m9s
ci / module boundaries / boundaries (push) Successful in 8s
ci / api / api (push) Successful in 1m17s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 1m21s
ci / ts / ts (packages + web) (push) Successful in 3m43s
ci / db / db (push) Canceled after 11m9s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
11b890c2e7
commit
795bb7de46
2 files changed
+4
-3
No files matched your search
@@ -57,7 +57,7 @@ type ArtistCredit struct {
|
||||
Role string // main | feat
|
||||
}
|
||||
|
||||
// SplitArtists разбирает поле исполнителя на отдельных. « & » делит имя, только если составного
|
||||
// SplitArtists разбирает поле исполнителя на отдельных. « & » и «, » делят имя, только если составного
|
||||
// исполнителя нет в библиотеке (known), — иначе «Simon & Garfunkel» распался бы на двоих.
|
||||
// Всё после feat./ft. — приглашённые исполнители.
|
||||
func SplitArtists(s string, known func(key string) bool) []ArtistCredit {
|
||||
@@ -85,8 +85,8 @@ func SplitArtists(s string, known func(key string) bool) []ArtistCredit {
|
||||
}
|
||||
}
|
||||
for _, part := range splitAny(main, artistSeparators) {
|
||||
if strings.Contains(part, " & ") && (known == nil || !known(Key(part))) {
|
||||
for _, p := range strings.Split(part, " & ") {
|
||||
if (strings.Contains(part, " & ") || strings.Contains(part, ", ")) && (known == nil || !known(Key(part))) {
|
||||
for _, p := range splitAny(part, []string{" & ", ", "}) {
|
||||
add(p, "main")
|
||||
}
|
||||
continue
|
||||
|
||||
Reference in new issue
Block a user