From 9cfdbc1d9f5490d36b4d039568974c70f7bb8a10 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Sat, 20 Apr 2024 14:01:17 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20For=20albums=20you=20can=20now=20us?= =?UTF-8?q?e=20`album=5Fnum=5Fvolumes`=20as=20a=20placeholder=20and=20for?= =?UTF-8?q?=20tracks=20`track=5Fvolume=5Fnum`.=20Fixes=20#90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/helper/path.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py index 0af1b25..7ef8a07 100644 --- a/tidal_dl_ng/helper/path.py +++ b/tidal_dl_ng/helper/path.py @@ -142,6 +142,12 @@ def format_str_media(name: str, media: Track | Album | Playlist | UserPlaylist | case "album_explicit": if isinstance(media, Album): result = " (Explicit)" if media.explicit else "" + case "album_num_volumes": + if isinstance(media, Album): + result = media.num_volumes + case "track_volume_num": + if isinstance(media, Track | Video): + result = media.volume_num except Exception as e: # TODO: Implement better exception logging. print(e)