summaryrefslogtreecommitdiff
path: root/tidal_dl_ng/helper/tidal.py
diff options
context:
space:
mode:
authorRobert Honz <exislow+github@gmail.com>2024-03-19 14:44:16 +0100
committerRobert Honz <exislow+github@gmail.com>2024-03-19 14:53:09 +0100
commite1dfc9ae0b86601e950387882533ab7ea6684f22 (patch)
treeac4bafded0151f88fd04e122fd7e44d0895e37e0 /tidal_dl_ng/helper/tidal.py
parent1e42f7c22d9cffe48163366eba3373f548ab235f (diff)
downloadtidal-dl-ng-e1dfc9ae0b86601e950387882533ab7ea6684f22.tar.gz
✨ Adds 'album_artist' to the folder names. Fixes #51
Diffstat (limited to 'tidal_dl_ng/helper/tidal.py')
-rw-r--r--tidal_dl_ng/helper/tidal.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tidal_dl_ng/helper/tidal.py b/tidal_dl_ng/helper/tidal.py
index 2a61bd6..77dd72d 100644
--- a/tidal_dl_ng/helper/tidal.py
+++ b/tidal_dl_ng/helper/tidal.py
@@ -1,5 +1,5 @@
from tidalapi import Album, Mix, Playlist, Session, Track, UserPlaylist, Video
-from tidalapi.artist import Role
+from tidalapi.artist import Role, Artist
from tidalapi.session import SearchTypes
from tidal_dl_ng.constants import MediaType
@@ -12,8 +12,9 @@ def name_builder_artist(media: Track | Video | Album) -> str:
def name_builder_album_artist(media: Track | Album) -> str:
artists_tmp: [str] = []
+ artists: [Artist] = media.album.artists if isinstance(media, Track) else media.artists
- for artist in media.album.artists:
+ for artist in artists:
if Role.main in artist.roles:
artists_tmp.append(artist.name)