mirror of
https://github.com/navidrome/navidrome.git
synced 2025-12-23 23:18:05 -05:00
fix(scanner): fix misleading custom tag split config message.
See https://github.com/navidrome/navidrome/discussions/3901#discussioncomment-13883185 Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -138,7 +138,7 @@ func compileSplitRegex(tagName TagName, split []string) *regexp.Regexp {
|
||||
escaped = append(escaped, regexp.QuoteMeta(s))
|
||||
}
|
||||
// If no valid separators remain, return the original value.
|
||||
if len(escaped) == 0 {
|
||||
if len(split) > 0 && len(escaped) == 0 {
|
||||
log.Warn("No valid separators found in split list", "split", split, "tag", tagName)
|
||||
return nil
|
||||
}
|
||||
@@ -147,7 +147,7 @@ func compileSplitRegex(tagName TagName, split []string) *regexp.Regexp {
|
||||
pattern := "(?i)(" + strings.Join(escaped, "|") + ")"
|
||||
re, err := regexp.Compile(pattern)
|
||||
if err != nil {
|
||||
log.Error("Error compiling regexp", "pattern", pattern, "tag", tagName, "err", err)
|
||||
log.Warn("Error compiling regexp for split list", "pattern", pattern, "tag", tagName, "split", split, err)
|
||||
return nil
|
||||
}
|
||||
return re
|
||||
|
||||
Reference in New Issue
Block a user