From 9c78c2bd6a84c0d7a86f33dc82ff1744553d5119 Mon Sep 17 00:00:00 2001 From: Thomas de Lachaux <21559770+ThomasLachaux@users.noreply.github.com> Date: Wed, 24 Dec 2025 15:46:06 +0100 Subject: [PATCH] feat(track): add id field to formatter --- streamrip/config.toml | 2 +- streamrip/metadata/track.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/streamrip/config.toml b/streamrip/config.toml index dadf7219..029115bd 100644 --- a/streamrip/config.toml +++ b/streamrip/config.toml @@ -166,7 +166,7 @@ add_singles_to_folder = false # Available keys: "albumartist", "title", "year", "bit_depth", "sampling_rate", # "id", and "albumcomposer" folder_format = "{albumartist} - {title} ({year}) [{container}] [{bit_depth}B-{sampling_rate}kHz]" -# Available keys: "tracknumber", "artist", "albumartist", "composer", "title", +# Available keys: "id", "tracknumber", "artist", "albumartist", "composer", "title", # and "albumcomposer", "explicit" track_format = "{tracknumber:02}. {artist} - {title}{explicit}" # Only allow printable ASCII characters in filenames. diff --git a/streamrip/metadata/track.py b/streamrip/metadata/track.py index d25b31b3..bea7a9b0 100644 --- a/streamrip/metadata/track.py +++ b/streamrip/metadata/track.py @@ -232,6 +232,7 @@ def format_track_path(self, format_string: str) -> str: # and "explicit", "albumcomposer" none_text = "Unknown" info = { + "id": self.info.id, "title": self.title, "tracknumber": self.tracknumber, "artist": self.artist,