Consolidate usage of 'artist names' string

This commit is contained in:
Claudio Ortolina
2025-04-20 14:29:53 +01:00
parent 5fe3e8eee1
commit 17c9098aba
4 changed files with 9 additions and 11 deletions
+4
View File
@@ -30,6 +30,10 @@ defmodule MusicLibrary.Records.Record do
timestamps(type: :utc_datetime)
end
def artist_names(record) do
Enum.map_join(record.artists, ", ", fn artist -> artist.name end)
end
def formats, do: @formats
def types, do: @types