Consolidate handling of artist joinphrases

This commit is contained in:
Claudio Ortolina
2026-03-19 15:09:34 +00:00
parent 7d55dfd9ae
commit 715a1e1f69
4 changed files with 9 additions and 11 deletions
+3 -1
View File
@@ -37,7 +37,9 @@ defmodule MusicLibrary.Records.Record do
@spec artist_names(t()) :: String.t()
def artist_names(record) do
Enum.map_join(record.artists, ", ", fn artist -> artist.name end)
record.artists
|> Enum.map_join(fn artist -> artist.name <> artist.joinphrase end)
|> String.trim()
end
@spec main_artist(t()) :: Artist.t() | nil