feat(music): list and select playlist songs by their position

This commit is contained in:
imSp4rky
2026-11-30 12:39:51 -07:00
parent 40114fff19
commit 70ace41201
16 changed files with 222 additions and 38 deletions
+11
View File
@@ -125,3 +125,14 @@ def test_songs_separator_survives_a_config_without_a_songs_template(reset_folder
"""A user config with output_template but no `songs` key used to raise a KeyError."""
reset_folder_config.output_template = {"movies": "{title}.{year}"}
assert reset_folder_config.get_template_separator("songs") == "."
def test_a_playlist_position_changes_no_output_name(reset_folder_config):
"""The file name, the folder and the text form of a song come from its own album."""
reset_folder_config.output_template = {"songs": "{disc?}-{track_number}. {title}"}
reset_folder_config.folder_templates = {"albums": "{album} {disc?} {track_number}"}
song = make_song(track=6, disc=2, position=9)
assert song.get_filename(StubMediaInfo()) == "02-06.Example.Track"
assert song.get_filename(StubMediaInfo(), folder=True) == "Example Album 02 06"
assert str(song) == "Example Artist - Example Album (2025) / 06. Example Track"