Add micro_cover_url

This commit is contained in:
Claudio Ortolina
2026-05-05 21:00:28 +01:00
parent 971e06513c
commit 0a9fafd35e
2 changed files with 6 additions and 2 deletions
@@ -36,7 +36,9 @@ defmodule MusicLibraryWeb.CollectionJSON do
cover_url: url(~p"/api/v1/assets/#{Transform.new(hash: record.cover_hash)}"),
thumb_url: url(~p"/api/v1/assets/#{Transform.new(hash: record.cover_hash, width: 480)}"),
mini_cover_url:
url(~p"/api/v1/assets/#{Transform.new(hash: record.cover_hash, width: 150)}")
url(~p"/api/v1/assets/#{Transform.new(hash: record.cover_hash, width: 150)}"),
micro_cover_url:
url(~p"/api/v1/assets/#{Transform.new(hash: record.cover_hash, width: 40)}")
}
end
end
@@ -102,7 +102,9 @@ defmodule MusicLibraryWeb.CollectionControllerTest do
"thumb_url" =>
"http://localhost:4002/api/v1/assets/eyJoYXNoIjoiNTk5NDA3RERGNjk5MDdENEE2MEZFMTNDQ0FBODI0RDI1Q0YwOERDMTI0RkQ2QUEzRThFN0VDRDk4Qzg4NUZGRSIsIndpZHRoIjo0ODB9",
"mini_cover_url" =>
"http://localhost:4002/api/v1/assets/eyJoYXNoIjoiNTk5NDA3RERGNjk5MDdENEE2MEZFMTNDQ0FBODI0RDI1Q0YwOERDMTI0RkQ2QUEzRThFN0VDRDk4Qzg4NUZGRSIsIndpZHRoIjoxNTB9"
"http://localhost:4002/api/v1/assets/eyJoYXNoIjoiNTk5NDA3RERGNjk5MDdENEE2MEZFMTNDQ0FBODI0RDI1Q0YwOERDMTI0RkQ2QUEzRThFN0VDRDk4Qzg4NUZGRSIsIndpZHRoIjoxNTB9",
"micro_cover_url" =>
"http://localhost:4002/api/v1/assets/eyJoYXNoIjoiNTk5NDA3RERGNjk5MDdENEE2MEZFMTNDQ0FBODI0RDI1Q0YwOERDMTI0RkQ2QUEzRThFN0VDRDk4Qzg4NUZGRSIsIndpZHRoIjo0MH0"
}
end
end