mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-13 12:57:10 +02:00
Converting every '\' to '/' broke escaped literals such as '\[Mix\]',
which matched a real "[Mix]" folder before. On Windows, '\' is now a
path separator except for an escaped pair ('\[...\]', '\{...\}') or a
lone '\]' / '\}', so 'Playlists\navidrome', 'Playlists\{rock,jazz}',
'Playlists\[ab]' and '\[Mix\]' all work. Other OSes keep the pattern
as is. A separator right before an escaped pair must be written as '/'
or '\\' ('Playlists/\[Mix\]').
InPath now matches the folder's slash-separated library path
(path.Join(Path, Name)) instead of a filepath.Rel/ToSlash round trip,
and gets its patterns from conf.PlaylistsPathPatterns, which the
config validation can share.
Tests cover the conversion, InPath with scanner-built folders, and
scans of real folders (nested paths, brackets, braces, controls).
|
||
|---|---|---|
| .. | ||
| import.go | ||
| import_test.go | ||
| parse_m3u.go | ||
| parse_m3u_test.go | ||
| parse_nsp.go | ||
| parse_nsp_test.go | ||
| playlists.go | ||
| playlists_suite_test.go | ||
| playlists_test.go | ||
| rest_adapter.go | ||
| rest_adapter_test.go | ||