Small refactoring

This commit is contained in:
Deluan
2024-06-05 22:39:36 -04:00
parent abe5690018
commit 11bef060a3
5 changed files with 53 additions and 56 deletions
-13
View File
@@ -2,8 +2,6 @@ package str
import (
"strings"
"github.com/navidrome/navidrome/conf"
)
func Clear(name string) string {
@@ -18,17 +16,6 @@ func Clear(name string) string {
return r.Replace(name)
}
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
}
func LongestCommonPrefix(list []string) string {
if len(list) == 0 {
return ""