diff --git a/lib/music_library_web/components/record_components.ex b/lib/music_library_web/components/record_components.ex
index 55b31bec..160e1377 100644
--- a/lib/music_library_web/components/record_components.ex
+++ b/lib/music_library_web/components/record_components.ex
@@ -465,54 +465,6 @@ defmodule MusicLibraryWeb.RecordComponents do
"""
end
- attr :similar_records, :list, required: true
- attr :record_show_path, :any, required: true
- attr :section, :atom, required: true
-
- def similar_records(assigns) do
- ~H"""
-
-
-
- {gettext("Similar Records")}
-
-
- {gettext("Based on genres, artists, and musical style")}
-
-
-
-
- -
-
- <.record_cover
- record={record}
- class="aspect-square object-cover rounded-lg group-hover:shadow-lg/20"
- width={300}
- />
-
- {Float.round(100 - similarity * 100, 0)}%
-
-
-
-
- {record.title}
-
-
- {Records.Record.artist_names(record)}
-
-
-
-
- """
- end
-
attr :record, Records.Record, required: true
def release_list(assigns) do
diff --git a/lib/music_library_web/live/collection_live/show.ex b/lib/music_library_web/live/collection_live/show.ex
index e884d4db..8742ba59 100644
--- a/lib/music_library_web/live/collection_live/show.ex
+++ b/lib/music_library_web/live/collection_live/show.ex
@@ -17,8 +17,7 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
record_sets_list: 1,
record_timestamps: 1,
record_title_and_metadata: 1,
- release_summary: 1,
- similar_records: 1
+ release_summary: 1
]
alias MusicLibrary.{ListeningStats, Records, RecordSets, ScrobbleActivity}
@@ -278,11 +277,7 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
- <.similar_records
- similar_records={@similar_records}
- record_show_path={fn record -> ~p"/collection/#{record}" end}
- section={:collection}
- />
+ <.similar_records similar_records={@similar_records} />
<.record_debug_sheet record={@record} embedding_text={@embedding_text} />
@@ -544,6 +539,52 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
defp title_segment(:show), do: gettext("Details")
defp title_segment(:edit), do: gettext("Edit")
+ attr :similar_records, :list, required: true
+
+ defp similar_records(assigns) do
+ ~H"""
+
+
+
+ {gettext("Similar Records")}
+
+
+ {gettext("Based on genres, artists, and musical style")}
+
+
+
+
+ -
+
+ <.record_cover
+ record={record}
+ class="aspect-square object-cover rounded-lg group-hover:shadow-lg/20"
+ width={300}
+ />
+
+ {Float.round(100 - similarity * 100, 0)}%
+
+
+
+
+ {record.title}
+
+
+ {Records.Record.artist_names(record)}
+
+
+
+
+ """
+ end
+
defp assign_similar_records(socket) do
similar_records =
Similarity.find_similar(socket.assigns.record.id, limit: 6, scope: :collection)
diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot
index 8aa07404..c719a3b0 100644
--- a/priv/gettext/default.pot
+++ b/priv/gettext/default.pot
@@ -1362,7 +1362,7 @@ msgstr ""
msgid "External Links"
msgstr ""
-#: lib/music_library_web/components/record_components.ex
+#: lib/music_library_web/live/collection_live/show.ex
#, elixir-autogen, elixir-format
msgid "Similar Records"
msgstr ""
@@ -1845,7 +1845,7 @@ msgstr ""
msgid "Retry"
msgstr ""
-#: lib/music_library_web/components/record_components.ex
+#: lib/music_library_web/live/collection_live/show.ex
#, elixir-autogen, elixir-format
msgid "Based on genres, artists, and musical style"
msgstr ""
diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po
index 646a1e2e..910dae3d 100644
--- a/priv/gettext/en/LC_MESSAGES/default.po
+++ b/priv/gettext/en/LC_MESSAGES/default.po
@@ -1362,7 +1362,7 @@ msgstr ""
msgid "External Links"
msgstr ""
-#: lib/music_library_web/components/record_components.ex
+#: lib/music_library_web/live/collection_live/show.ex
#, elixir-autogen, elixir-format
msgid "Similar Records"
msgstr ""
@@ -1845,7 +1845,7 @@ msgstr ""
msgid "Retry"
msgstr ""
-#: lib/music_library_web/components/record_components.ex
+#: lib/music_library_web/live/collection_live/show.ex
#, elixir-autogen, elixir-format, fuzzy
msgid "Based on genres, artists, and musical style"
msgstr ""