Use map_join instead of map+join
This commit is contained in:
@@ -9,10 +9,7 @@ defmodule MusicBrainz.ReleaseGroupSearchResult do
|
||||
id: rg["id"],
|
||||
type: ReleaseGroup.parse_type(rg["primary-type"]),
|
||||
title: rg["title"],
|
||||
artists:
|
||||
rg["artist-credit"]
|
||||
|> Enum.map(fn ac -> ac["artist"]["name"] end)
|
||||
|> Enum.join(", "),
|
||||
artists: Enum.map_join(rg["artist-credit"], ", ", fn ac -> ac["artist"]["name"] end),
|
||||
release: rg["first-release-date"]
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user