mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-18 07:30:29 +00:00
fix(smartplaylists): warn when a relative inPlaylist path cannot be resolved
A playlist created in the UI has no file path, so a relative reference silently matched nothing.
This commit is contained in:
parent
ac21b7c969
commit
4553661909
@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/navidrome/navidrome/conf"
|
||||
"github.com/navidrome/navidrome/consts"
|
||||
"github.com/navidrome/navidrome/log"
|
||||
"github.com/navidrome/navidrome/model/criteria"
|
||||
)
|
||||
|
||||
@ -189,6 +190,8 @@ func normalizeChildPathRule(rule map[string]any, referencingPlaylistPath string)
|
||||
normalized["path"] = filepath.Clean(path)
|
||||
} else if referencingPlaylistPath != "" {
|
||||
normalized["path"] = filepath.Clean(filepath.Join(filepath.Dir(referencingPlaylistPath), path))
|
||||
} else {
|
||||
log.Warn("Cannot resolve relative playlist reference: playlist has no file path", "reference", path)
|
||||
}
|
||||
return normalized
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user