diff options
| author | Robert Honz <exislow+github@gmail.com> | 2024-04-20 14:01:17 +0200 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2024-04-20 14:01:17 +0200 |
| commit | 9cfdbc1d9f5490d36b4d039568974c70f7bb8a10 (patch) | |
| tree | 4218b31ef6e8028cfb9db40b70f8678024580d92 | |
| parent | 519e856b1477d3cad4da620ab9441aff86042ea7 (diff) | |
| download | tidal-dl-ng-9cfdbc1d9f5490d36b4d039568974c70f7bb8a10.tar.gz | |
✨ For albums you can now use `album_num_volumes` as a placeholder and for tracks `track_volume_num`. Fixes #90
| -rw-r--r-- | tidal_dl_ng/helper/path.py | 6 |
1 files changed, 6 insertions, 0 deletions
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) |
