summaryrefslogtreecommitdiff
path: root/tidal_dl_ng/helper/path.py
diff options
context:
space:
mode:
authorRobert Honz <exislow+github@gmail.com>2024-03-14 06:30:47 +0100
committerRobert Honz <exislow+github@gmail.com>2024-03-14 06:36:48 +0100
commit5c5aac11f1903805c8dc95c8eaffa9b8d9ca4c8a (patch)
tree584f4befef815672a80d0bae53cbc49de36dc940 /tidal_dl_ng/helper/path.py
parent7a357cdc61034564094dfbf6d8a2d03f825a2fa0 (diff)
downloadtidal-dl-ng-5c5aac11f1903805c8dc95c8eaffa9b8d9ca4c8a.tar.gz
✨ The full track name will be used as file title.
Diffstat (limited to 'tidal_dl_ng/helper/path.py')
-rw-r--r--tidal_dl_ng/helper/path.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py
index 65f9163..691056c 100644
--- a/tidal_dl_ng/helper/path.py
+++ b/tidal_dl_ng/helper/path.py
@@ -10,6 +10,7 @@ from tidalapi import Album, Mix, Playlist, Track, UserPlaylist, Video
from tidal_dl_ng import __name_display__
from tidal_dl_ng.constants import AudioExtensions, MediaType
+from tidal_dl_ng.helper.tidal import name_builder_artist, name_builder_title
def path_home() -> str:
@@ -84,12 +85,12 @@ def format_str_media(name: str, media: Track | Album | Playlist | UserPlaylist |
try:
if name == "artist_name":
if hasattr(media, "artists"):
- result = ", ".join(artist.name for artist in media.artists)
+ result = name_builder_artist(media)
elif hasattr(media, "artist"):
result = media.artist.name
elif name == "track_title":
if isinstance(media, Track | Video):
- result = media.name
+ result = name_builder_title(media)
elif name == "mix_name":
if isinstance(media, Mix):
result = media.title