Fixed parenthesis merging on artists

This commit is contained in:
DataHoarder 2022-02-20 15:00:21 +01:00
parent 48a12eae83
commit aa59f2e357

View file

@ -169,7 +169,7 @@ func getArtistEntries(kind string, entries []interface{}) (artists []artistEntry
}
recreateArtist(kind)
}
} else if i := strings.Index(text, " &"); i == len(text)-2 {
} else if i := strings.Index(text, " &"); i != -1 && i == len(text)-2 {
for _, vv := range strings.Split(text, " &") {
vv = normalizeStringCharacters(vv)
if len(vv) > 0 {
@ -193,7 +193,7 @@ func getArtistEntries(kind string, entries []interface{}) (artists []artistEntry
}
recreateArtist(kind)
}
} else if i := strings.Index(text, " and"); i == len(text)-4 {
} else if i := strings.Index(text, " and"); i != -1 && i == len(text)-4 {
for _, vv := range strings.Split(text, " and") {
vv = normalizeStringCharacters(vv)
if len(vv) > 0 {