YAML Configuration Refactor

This commit is contained in:
2026-05-07 13:44:46 +02:00
parent 7abcbf1a38
commit 000d31ad24
8 changed files with 860 additions and 87 deletions
+7 -1
View File
@@ -739,7 +739,13 @@ func musicPrefixForDir(p *project.Project, dir string) string {
dir = trimSlashes(filepath.ToSlash(dir))
bestPrefix := ""
bestLen := -1
for key, value := range p.Config.Music.Prefixes {
keys := make([]string, 0, len(p.Config.Music.Prefixes))
for key := range p.Config.Music.Prefixes {
keys = append(keys, key)
}
sort.Strings(keys)
for _, key := range keys {
value := p.Config.Music.Prefixes[key]
normalizedKey := trimSlashes(filepath.ToSlash(key))
if normalizedKey == "" {
continue