mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-08 18:37:09 +02:00
* feat: Add support for referencing playlists using paths Signed-off-by: David <dvedvick@gmail.com> * feat: Support relative playlist paths in smartlists Signed-off-by: David <dvedvick@gmail.com> * fix(smartplaylists): protect against nil panic Signed-off-by: David <dvedvick@gmail.com> * fix(smartplaylists): refreshing child playlists Signed-off-by: David <dvedvick@gmail.com> * chore(smartplaylists): log field parsing error Signed-off-by: David <dvedvick@gmail.com> * fix(smartplaylists): handle empty playlist paths Signed-off-by: David <dvedvick@gmail.com> * refactor(smartplaylists): make NormalizeChildPaths non-mutating Signed-off-by: David <dvedvick@gmail.com> * fix(smartplaylists): stop warning on every inPlaylist rule without the looked-up field Rules that reference a playlist by id have no path field, and the reverse, so the warning fired on every refresh. The log call also had a bad argument count. * fix(smartplaylists): ignore empty inPlaylist id and path references An empty path matched every playlist without a file path, including the referencing playlist itself, so the refresh recursed until the stack overflowed. An empty id also shadowed a valid path in the same rule. * fix(smartplaylists): match inPlaylist paths in both NFC and NFD forms A playlist path is stored in the Unicode form the filesystem reports, which can differ from the form typed in the .nsp file. The exact comparison then found no playlist for names with accents. * fix(smartplaylists): keep all criteria fields when normalizing child paths The field-by-field copy dropped RefreshDelay. * fix(smartplaylists): clean absolute inPlaylist path references Only relative references were cleaned, so an absolute reference such as /music/./child.nsp never matched the stored /music/child.nsp. * fix(smartplaylists): stop infinite recursion on playlists that reference each other Two smart playlists referencing each other, by id or by path, recursed until the stack overflowed and the server died. The refresh now tracks visited playlists. * fix(smartplaylists): resolve inPlaylist path references with OS-native separators Playlist.Path is OS-native, but references in a .nsp file use forward slashes. On Windows they never matched, and a leading slash was not seen as absolute. The specs now build OS-native paths, so they also run on Windows. * 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. * refactor(smartplaylists): simplify child playlist reference handling Share one extractor for child ids and paths, return only the normalized rules instead of a playlist copy, and resolve each path reference in a single switch. * test(smartplaylists): store the Unicode child path in OS-native form Playlist.Path is OS-native, so on Windows the forward-slash fixture never matched the normalized reference. --------- Signed-off-by: David <dvedvick@gmail.com> Co-authored-by: Deluan Quintão <deluan@navidrome.org> |
||
|---|---|---|
| .. | ||
| criteria | ||
| id | ||
| metadata | ||
| request | ||
| album.go | ||
| album_test.go | ||
| annotation.go | ||
| artist.go | ||
| artist_info.go | ||
| artist_test.go | ||
| artwork.go | ||
| artwork_id.go | ||
| artwork_id_test.go | ||
| artwork_test.go | ||
| bookmark.go | ||
| datastore.go | ||
| errors.go | ||
| file_types.go | ||
| file_types_test.go | ||
| folder.go | ||
| folder_test.go | ||
| genre.go | ||
| get_entity.go | ||
| get_entity_test.go | ||
| image.go | ||
| library.go | ||
| lyrics.go | ||
| lyrics_benchmark_test.go | ||
| lyrics_lrc.go | ||
| lyrics_lrc_test.go | ||
| lyrics_lyricsfile.go | ||
| lyrics_lyricsfile_test.go | ||
| lyrics_normalize.go | ||
| lyrics_normalize_test.go | ||
| lyrics_parse.go | ||
| lyrics_parse_test.go | ||
| lyrics_srt.go | ||
| lyrics_srt_test.go | ||
| lyrics_test.go | ||
| lyrics_ttml.go | ||
| lyrics_ttml_test.go | ||
| mediafile.go | ||
| mediafile_internal_test.go | ||
| mediafile_test.go | ||
| model_suite_test.go | ||
| participants.go | ||
| participants_test.go | ||
| player.go | ||
| playlist.go | ||
| playlist_test.go | ||
| playqueue.go | ||
| plugin.go | ||
| properties.go | ||
| radio.go | ||
| radio_test.go | ||
| scanner.go | ||
| scanner_test.go | ||
| scrobble.go | ||
| scrobble_buffer.go | ||
| searchable.go | ||
| share.go | ||
| share_test.go | ||
| tag.go | ||
| tag_mappings.go | ||
| tag_mappings_test.go | ||
| tag_test.go | ||
| transcoding.go | ||
| user.go | ||
| user_props.go | ||
| user_test.go | ||