@@ -61,6 +61,30 @@
alt={@artist.name}
onerror={"this.src = '" <> ~p"/images/cover-not-found.png" <> "';"}
/>
+
<.async_result :let={lastfm_artist_info} assign={@lastfm_artist_info}>
<:loading>
+
<.record_grid
:if={@collection_records_count > 0}
title={gettext("Collection")}
diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot
index 8bcee7cf..6fa78f9e 100644
--- a/priv/gettext/default.pot
+++ b/priv/gettext/default.pot
@@ -106,6 +106,7 @@ msgid "Logout"
msgstr ""
#: lib/music_library_web/components/form_component.ex
+#: lib/music_library_web/live/artist_live/show.html.heex
#: lib/music_library_web/live/collection_live/show.html.heex
#: lib/music_library_web/live/wishlist_live/show.html.heex
#, elixir-autogen, elixir-format
@@ -262,6 +263,7 @@ msgstr ""
msgid "close"
msgstr ""
+#: lib/music_library_web/live/artist_live/show.html.heex
#: lib/music_library_web/live/collection_live/show.html.heex
#: lib/music_library_web/live/wishlist_live/show.html.heex
#, elixir-autogen, elixir-format
diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po
index ea2664ea..bba99cf8 100644
--- a/priv/gettext/en/LC_MESSAGES/default.po
+++ b/priv/gettext/en/LC_MESSAGES/default.po
@@ -106,6 +106,7 @@ msgid "Logout"
msgstr ""
#: lib/music_library_web/components/form_component.ex
+#: lib/music_library_web/live/artist_live/show.html.heex
#: lib/music_library_web/live/collection_live/show.html.heex
#: lib/music_library_web/live/wishlist_live/show.html.heex
#, elixir-autogen, elixir-format
@@ -262,6 +263,7 @@ msgstr ""
msgid "close"
msgstr ""
+#: lib/music_library_web/live/artist_live/show.html.heex
#: lib/music_library_web/live/collection_live/show.html.heex
#: lib/music_library_web/live/wishlist_live/show.html.heex
#, elixir-autogen, elixir-format
diff --git a/test/music_library_web/live/artist_live/show_test.exs b/test/music_library_web/live/artist_live/show_test.exs
index 6433c8e2..37807cc8 100644
--- a/test/music_library_web/live/artist_live/show_test.exs
+++ b/test/music_library_web/live/artist_live/show_test.exs
@@ -70,7 +70,7 @@ defmodule MusicLibraryWeb.ArtistLive.ShowTest do
|> assert_has("div", text: "Error loading biography")
end
- test "it shows the artist country", %{
+ test "it shows the artist country and MB id", %{
conn: conn,
artist_musicbrainz_id: artist_musicbrainz_id
} do
@@ -89,6 +89,7 @@ defmodule MusicLibraryWeb.ArtistLive.ShowTest do
|> unwrap(&render_async/1)
|> assert_has("span", text: "United Kingdom")
|> assert_has("span", text: "🇬🇧")
+ |> assert_has("dd", text: artist_musicbrainz_id)
end
test "it shows records from the collection and the wishlist", %{