diff --git a/lib/music_library_web/live/stats_live/index.ex b/lib/music_library_web/live/stats_live/index.ex index d866a9e3..6693b1c0 100644 --- a/lib/music_library_web/live/stats_live/index.ex +++ b/lib/music_library_web/live/stats_live/index.ex @@ -48,32 +48,6 @@ defmodule MusicLibraryWeb.StatsLive.Index do )} end - def handle_event("import", %{"id" => musicbrainz_id, "format" => format}, socket) do - case Records.import_from_musicbrainz_release(musicbrainz_id, - format: format, - purchased_at: nil - ) do - {:ok, record} -> - {:noreply, - socket - |> put_flash(:info, gettext("Record imported successfully")) - |> push_navigate(to: ~p"/wishlist/#{record.id}")} - - {:error, %Ecto.Changeset{} = changeset} -> - {:noreply, - socket - |> put_flash( - :error, - gettext("Error importing record") <> "," <> inspect(changeset.errors) - )} - - {:error, reason} -> - {:noreply, - socket - |> put_flash(:error, gettext("Error importing record") <> "," <> inspect(reason))} - end - end - def handle_event("refresh_lastfm_feed", _, socket) do LastFm.Refresh.refresh() {:noreply, socket} diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 8d4a497f..c88ca5d5 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -83,8 +83,6 @@ msgstr "" #: lib/music_library_web/live/collection_live/index.ex:123 #: lib/music_library_web/live/collection_live/index.ex:130 -#: lib/music_library_web/live/stats_live/index.ex:67 -#: lib/music_library_web/live/stats_live/index.ex:73 #: lib/music_library_web/live/wishlist_live/index.ex:120 #: lib/music_library_web/live/wishlist_live/index.ex:127 #, elixir-autogen, elixir-format @@ -206,7 +204,6 @@ msgid "Purchased on" msgstr "" #: lib/music_library_web/live/collection_live/index.ex:115 -#: lib/music_library_web/live/stats_live/index.ex:59 #: lib/music_library_web/live/wishlist_live/index.ex:112 #, elixir-autogen, elixir-format msgid "Record imported successfully"