diff --git a/lib/music_library_web/components/layouts/app.html.heex b/lib/music_library_web/components/layouts/app.html.heex
index 5b9f7861..71063571 100644
--- a/lib/music_library_web/components/layouts/app.html.heex
+++ b/lib/music_library_web/components/layouts/app.html.heex
@@ -7,7 +7,7 @@
<%= gettext("Stats") %>
<.link
- navigate={~p"/records"}
+ navigate={~p"/collection"}
class={section_link_classes(assigns[:nav_section], :records)}
>
<%= gettext("Collection") %>
diff --git a/lib/music_library_web/live/collection_live/index.ex b/lib/music_library_web/live/collection_live/index.ex
index e5bb15df..b5c6c755 100644
--- a/lib/music_library_web/live/collection_live/index.ex
+++ b/lib/music_library_web/live/collection_live/index.ex
@@ -96,7 +96,7 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
|> Map.put(:query, query)
|> Map.take([:query, :page, :page_size])
- {:noreply, push_patch(socket, to: ~p"/records?#{qs}")}
+ {:noreply, push_patch(socket, to: ~p"/collection?#{qs}")}
end
def handle_event("import", %{"id" => musicbrainz_id, "format" => format}, socket) do
@@ -110,7 +110,7 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
{:noreply,
socket
|> put_flash(:info, gettext("Record imported successfully"))
- |> push_navigate(to: ~p"/records/#{record.id}")}
+ |> push_navigate(to: ~p"/collection/#{record.id}")}
{:error, %Ecto.Changeset{} = changeset} ->
{:noreply, assign(socket, form: to_form(changeset))}
@@ -119,7 +119,7 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
{:noreply,
socket
|> put_flash(:error, gettext("Error importing record") <> "," <> inspect(reason))
- |> push_patch(to: ~p"/records")}
+ |> push_patch(to: ~p"/collection")}
end
end
@@ -149,7 +149,7 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
|> Map.take([:query, :page, :page_size])
|> Enum.filter(fn {_, v} -> v not in ["", nil] end)
- ~p"/records?#{qs}"
+ ~p"/collection?#{qs}"
end
defp musicbrainz_url(record) do
diff --git a/lib/music_library_web/live/collection_live/index.html.heex b/lib/music_library_web/live/collection_live/index.html.heex
index 01371b81..a5608dc9 100644
--- a/lib/music_library_web/live/collection_live/index.html.heex
+++ b/lib/music_library_web/live/collection_live/index.html.heex
@@ -13,7 +13,7 @@
autocapitalize="none"
/>
- <.link patch={~p"/records/import"}>
+ <.link patch={~p"/collection/import"}>
<.button><%= gettext("Import") %>
@@ -36,7 +36,7 @@
>
@@ -51,7 +51,7 @@
<.link
:for={artist <- record.artists}
class="text-zinc-700 hover:text-zinc-500 dark:text-zinc-400 dark:hover:text-zinc-300"
- patch={~p"/records?query=mbid:#{artist.musicbrainz_id}"}
+ patch={~p"/collection?query=mbid:#{artist.musicbrainz_id}"}
>
<%= artist.name %>
@@ -151,7 +151,7 @@
role="menuitem"
tabindex="-1"
id={"actions-#{record.id}-show"}
- navigate={~p"/records/#{record}"}
+ navigate={~p"/collection/#{record}"}
>
<%= gettext("Show") %>
@@ -171,7 +171,7 @@
role="menuitem"
tabindex="-1"
id={"actions-#{record.id}-edit"}
- patch={~p"/records/#{record}/edit"}
+ patch={~p"/collection/#{record}/edit"}
>
<%= gettext("Edit") %>
diff --git a/lib/music_library_web/live/collection_live/show.ex b/lib/music_library_web/live/collection_live/show.ex
index d97f05fa..a7168a08 100644
--- a/lib/music_library_web/live/collection_live/show.ex
+++ b/lib/music_library_web/live/collection_live/show.ex
@@ -9,9 +9,9 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
if connected?(socket) do
socket
|> get_connect_params()
- |> Map.get("_live_referer", ~p"/records")
+ |> Map.get("_live_referer", ~p"/collection")
else
- ~p"/records"
+ ~p"/collection"
end
socket =
@@ -40,7 +40,7 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
record = Records.get_record!(id)
{:ok, _} = Records.delete_record(record)
- {:noreply, push_navigate(socket, to: ~p"/records")}
+ {:noreply, push_navigate(socket, to: ~p"/collection")}
end
def handle_event("refresh_musicbrainz_data", %{"id" => id}, socket) do
diff --git a/lib/music_library_web/live/collection_live/show.html.heex b/lib/music_library_web/live/collection_live/show.html.heex
index 77ae8781..384b7b2c 100644
--- a/lib/music_library_web/live/collection_live/show.html.heex
+++ b/lib/music_library_web/live/collection_live/show.html.heex
@@ -12,7 +12,7 @@
<.link
:for={artist <- @record.artists}
class="text-zinc-700 hover:text-zinc-500 dark:text-zinc-400 dark:hover:text-zinc-300"
- patch={~p"/records?query=mbid:#{artist.musicbrainz_id}"}
+ patch={~p"/collection?query=mbid:#{artist.musicbrainz_id}"}
>
<%= artist.name %>
@@ -27,7 +27,7 @@