diff options
| author | Robert Honz <exislow+github@gmail.com> | 2025-06-29 21:42:39 +0200 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2025-06-29 21:42:39 +0200 |
| commit | db5c5eac9706eb5ab8d11c05f4346d64653ba83c (patch) | |
| tree | dfcc03dc4e12390a3fa956ff0cd2c0bd1835df7f /tidal_dl_ng/helper/tidal.py | |
| parent | 8fa41050ec1fe286ac0d188131af2823cf37a2af (diff) | |
| download | tidal-dl-ng-db5c5eac9706eb5ab8d11c05f4346d64653ba83c.tar.gz | |
✨ will only return the first artists. will return all album artists. Fixes #439
Diffstat (limited to 'tidal_dl_ng/helper/tidal.py')
| -rw-r--r-- | tidal_dl_ng/helper/tidal.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tidal_dl_ng/helper/tidal.py b/tidal_dl_ng/helper/tidal.py index c2c18d8..3896fa6 100644 --- a/tidal_dl_ng/helper/tidal.py +++ b/tidal_dl_ng/helper/tidal.py @@ -14,7 +14,7 @@ def name_builder_artist(media: Track | Video | Album) -> str: return ", ".join(artist.name for artist in media.artists) -def name_builder_album_artist(media: Track | Album) -> str: +def name_builder_album_artist(media: Track | Album, first_only: bool = False) -> str: artists_tmp: [str] = [] artists: [Artist] = media.album.artists if isinstance(media, Track) else media.artists @@ -22,6 +22,9 @@ def name_builder_album_artist(media: Track | Album) -> str: if Role.main in artist.roles: artists_tmp.append(artist.name) + if first_only: + break + return ", ".join(artists_tmp) |
