diff options
| author | Robert Honz <exislow+github@gmail.com> | 2024-12-13 10:33:35 +0100 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2024-12-13 10:33:35 +0100 |
| commit | ccbb1f246c01aeaa1c20864453cb55d31b9c7069 (patch) | |
| tree | e99eb5e95c27ef7e279173002a6494970a8dbc77 /tidal_dl_ng | |
| parent | fc32e99907878b8a16e975ccfd0732718c413373 (diff) | |
| download | tidal-dl-ng-ccbb1f246c01aeaa1c20864453cb55d31b9c7069.tar.gz | |
🛠️ Fixed track volume number gets omitted on CDn-1. Fixes #151
Diffstat (limited to 'tidal_dl_ng')
| -rw-r--r-- | tidal_dl_ng/helper/path.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py index fb7bb87..d9ff35c 100644 --- a/tidal_dl_ng/helper/path.py +++ b/tidal_dl_ng/helper/path.py @@ -160,11 +160,11 @@ def format_str_media(name: str, media: Track | Album | Playlist | UserPlaylist | case "track_volume_num_optional": if isinstance(media, Track | Video): num_volumes: int = media.album.num_volumes if hasattr(media, "album") else 1 - result = "" if media.volume_num is num_volumes else str(media.volume_num) + result = "" if num_volumes is 1 else str(media.volume_num) case "track_volume_num_optional_CD": if isinstance(media, Track | Video): num_volumes: int = media.album.num_volumes if hasattr(media, "album") else 1 - result = "" if media.volume_num is num_volumes else f"CD{media.volume_num!s}" + result = "" if num_volumes is 1 else f"CD{media.volume_num!s}" except Exception as e: # TODO: Implement better exception logging. print(e) |
