mirror of
https://github.com/navidrome/navidrome.git
synced 2024-09-10 11:32:48 +02:00
18 lines
302 B
Go
18 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
|
|
}
|