feat(*): add image grids for album and associated media displays

This commit is contained in:
Cory Dransfeldt 2025-05-24 17:19:30 -07:00
parent 9b4baad5fb
commit 36fbba761a
No known key found for this signature in database
53 changed files with 1179 additions and 764 deletions

View file

@ -5,7 +5,20 @@ SELECT
COUNT(*) AS plays,
ol.album_art,
ol.artist_url,
json_build_object('title', ol.album_name, 'image', ol.album_art, 'url', ol.artist_url, 'alt', CONCAT(ol.album_name, ' by ', ol.artist_name), 'subtext', ol.artist_name) AS grid
json_build_object(
'title', ol.album_name,
'image', ol.album_art,
'url', ol.artist_url,
'alt', CONCAT(ol.album_name, ' by ', ol.artist_name),
'subtext', ol.artist_name
) AS grid,
json_build_object(
'open_graph_image',
CASE
WHEN ol.opengraph_image_album IS NOT NULL AND ol.opengraph_image_album != '' AND ol.opengraph_image_album != '/' THEN ol.opengraph_image_album
ELSE NULL
END
) AS metadata
FROM
optimized_listens ol
WHERE
@ -14,7 +27,7 @@ GROUP BY
ol.album_name,
ol.artist_name,
ol.album_art,
ol.artist_url
ol.artist_url,
ol.opengraph_image_album
ORDER BY
plays DESC;