Return thumb_url in latest record response

This commit is contained in:
Claudio Ortolina
2024-12-31 11:39:36 +00:00
parent 6b55d58621
commit 68b2d48228
2 changed files with 5 additions and 2 deletions
@@ -5,7 +5,8 @@ defmodule MusicLibraryWeb.CollectionJSON do
%{
artists: Enum.map(record.artists, & &1.name),
title: record.title,
cover_url: url(~p"/api/covers/#{record.id}?#{[vsn: record.cover_hash]}")
cover_url: url(~p"/api/covers/#{record.id}?#{[vsn: record.cover_hash]}"),
thumb_url: url(~p"/api/covers/#{record.id}?#{[vsn: record.cover_hash, size: 480]}")
}
end
end