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.
This commit is contained in:
Jeff Brower
2025-10-26 10:33:07 -04:00
committed by GitHub
parent 3bd41f2139
commit be43c3f616
+2 -2
View File
@@ -45,8 +45,8 @@ def name_builder_album_artist(media: Track | Album, first_only: bool = False, de
if Role.main in artist.roles: if Role.main in artist.roles:
artists_tmp.append(artist.name) artists_tmp.append(artist.name)
if first_only: if first_only:
break break
return delimiter.join(artists_tmp) return delimiter.join(artists_tmp)