Load dominant colors from record

This commit is contained in:
Claudio Ortolina
2025-06-07 20:41:39 +01:00
parent 378992e632
commit be8b7ead5f
5 changed files with 5 additions and 9 deletions
@@ -32,7 +32,6 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
def handle_params(%{"id" => id}, _, socket) do
record = Records.get_record!(id)
last_listened_track = Records.get_last_listened_track(record)
{:ok, dominant_colors} = Records.DominantColors.extract_dominant_colors(record.cover_data)
socket =
if record.selected_release_id do
@@ -46,7 +45,6 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
|> assign(:current_section, :collection)
|> assign(:page_title, page_title(socket.assigns.live_action, record))
|> assign(:record, record)
|> assign(:dominant_colors, dominant_colors)
|> assign(:last_listened_track, last_listened_track)}
end