mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 21:17:37 +03:00
17 lines
302 B
Go
17 lines
302 B
Go
package utils
|
|
|
|
import (
|
|
"strings"
|
|
"github.com/astaxie/beego"
|
|
)
|
|
|
|
func NoArticle(name string) string {
|
|
articles := strings.Split(beego.AppConfig.String("ignoredArticles"), " ")
|
|
for _, a := range articles {
|
|
n := strings.TrimPrefix(name, a + " ")
|
|
if (n != name) {
|
|
return n
|
|
}
|
|
}
|
|
return name
|
|
}
|