To get artist info, try mbid and then artist name

This commit is contained in:
Claudio Ortolina
2024-12-04 21:07:56 +00:00
parent 39b925676f
commit 8350ffd3a4
5 changed files with 40 additions and 13 deletions
@@ -23,7 +23,7 @@ defmodule MusicLibraryWeb.ArtistLive.Show do
|> assign(:artist, artist)
|> assign(:artist_records, grouped_artist_records)
|> assign_async(:artist_info, fn ->
with {:ok, artist_info} <- Records.get_artist_info(musicbrainz_id) do
with {:ok, artist_info} <- Records.get_artist_info(artist) do
{:ok, %{artist_info: artist_info}}
end
end)