summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Brower <jeff@jeffbrower.com>2025-10-26 10:33:07 -0400
committerGitHub <noreply@github.com>2025-10-26 10:33:07 -0400
commitbe43c3f616f2d33a8513f256249d059fa658aa43 (patch)
tree77d89923ec812fa9954a631e2a0e74e539268679
parent3bd41f2139d0dece90cb84664c89056400d34135 (diff)
downloadtidal-dl-ng-be43c3f616f2d33a8513f256249d059fa658aa43.tar.gz
Fix album_artist substitution
For albums that are listed with a non-"main" artist first (ex: 37691520), the album artist replacement was returning an empty string. This isn't a problem with the default settings, but if you format albums into `{album_artist}/...`, the path becomes `/...` in this case, and is interpreted as an absolute path instead of a relative one, causing the download to fail. This changes the logic so that if the `first_only` flag is passed, it will return after the first artist is actually added to the list, no longer returning an empty string.
-rw-r--r--tidal_dl_ng/helper/tidal.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tidal_dl_ng/helper/tidal.py b/tidal_dl_ng/helper/tidal.py
index 4a06d21..458af49 100644
--- a/tidal_dl_ng/helper/tidal.py
+++ b/tidal_dl_ng/helper/tidal.py
@@ -45,8 +45,8 @@ def name_builder_album_artist(media: Track | Album, first_only: bool = False, de
if Role.main in artist.roles:
artists_tmp.append(artist.name)
- if first_only:
- break
+ if first_only:
+ break
return delimiter.join(artists_tmp)