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)