forked from kenzuya/unshackle
feat(music): list and select playlist songs by their position
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user