diff options
| author | Robert Honz <exislow+github@gmail.com> | 2024-11-10 13:56:27 +0100 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2024-11-10 13:56:27 +0100 |
| commit | cee7696cfb427a3baaa3b18e5237700636457d6b (patch) | |
| tree | 16ec12c0b8f84172a76ea3f536b8bbd0e2c466af /tidal_dl_ng/helper/path.py | |
| parent | 96f762651e5b97d3d81b10170ba82db6da0b87db (diff) | |
| download | tidal-dl-ng-cee7696cfb427a3baaa3b18e5237700636457d6b.tar.gz | |
Fix: Replace `{artist_name}` only on Track / Video basis. Fixes #171
Diffstat (limited to 'tidal_dl_ng/helper/path.py')
| -rw-r--r-- | tidal_dl_ng/helper/path.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py index 09aa899..4be06e7 100644 --- a/tidal_dl_ng/helper/path.py +++ b/tidal_dl_ng/helper/path.py @@ -71,10 +71,11 @@ def format_str_media(name: str, media: Track | Album | Playlist | UserPlaylist | try: match name: case "artist_name": - if hasattr(media, "artists"): - result = name_builder_artist(media) - elif hasattr(media, "artist"): - result = media.artist.name + if isinstance(media, Track | Video): + if hasattr(media, "artists"): + result = name_builder_artist(media) + elif hasattr(media, "artist"): + result = media.artist.name case "album_artist": result = name_builder_album_artist(media) case "track_title": |
