Allow manual upload of artist image

This commit is contained in:
Claudio Ortolina
2025-07-06 16:57:30 +01:00
parent 97950e3ad5
commit f57485e509
7 changed files with 254 additions and 1 deletions
+24 -1
View File
@@ -230,7 +230,19 @@ defmodule MusicLibraryWeb.ArtistLive.Show do
socket
|> assign(:page_title, gettext("Add more · Artist"))
|> assign(:initial_query, "arid:#{socket.assigns.artist.musicbrainz_id}")
|> assign(:record, nil)
end
defp apply_action(socket, :edit, params) do
socket =
if get_in(socket.assigns, [:streams, :collection_records]) == nil do
socket
|> apply_action(:show, params)
else
socket
end
socket
|> assign(:page_title, gettext("Add more · Artist"))
end
defp assign_records(socket, artist_musicbrainz_id) do
@@ -257,6 +269,17 @@ defmodule MusicLibraryWeb.ArtistLive.Show do
)
end
defp page_title(:edit, artist) do
Enum.join(
[
artist.name,
"·",
gettext("Edit")
],
" "
)
end
defp page_title(:import, artist) do
Enum.join(
[