navidrome/utils/strings.go

18 lines
293 B
Go

package utils
import (
"strings"
"github.com/deluan/navidrome/conf"
)
func NoArticle(name string) string {
articles := strings.Split(conf.Server.IgnoredArticles, " ")
for _, a := range articles {
n := strings.TrimPrefix(name, a+" ")
if n != name {
return n
}
}
return name
}