chore: fix related books + deduplication
- fixed total plays formatting - formatted queries - improved proxy server
This commit is contained in:
parent
ab50866bb8
commit
d2c4c78ff7
40 changed files with 985 additions and 1357 deletions
|
@ -5,18 +5,15 @@ SELECT
|
|||
ol.artist_art,
|
||||
ol.artist_url,
|
||||
ARRAY_AGG(DISTINCT ol.genre_name) AS genres,
|
||||
json_build_object(
|
||||
'title', ol.artist_name,
|
||||
'image', ol.artist_art,
|
||||
'url', ol.artist_url,
|
||||
'alt', CONCAT(COUNT(*), ' plays of ', ol.artist_name),
|
||||
'subtext', CONCAT(COUNT(*), ' plays')
|
||||
) AS grid
|
||||
json_build_object('title', ol.artist_name, 'image', ol.artist_art, 'url', ol.artist_url, 'alt', CONCAT(COUNT(*), ' plays of ', ol.artist_name), 'subtext', CONCAT(COUNT(*), ' plays')) AS grid
|
||||
FROM
|
||||
optimized_listens ol
|
||||
WHERE
|
||||
TO_TIMESTAMP(ol.listened_at) >= NOW() - INTERVAL '30 days'
|
||||
GROUP BY
|
||||
ol.artist_name, ol.artist_art, ol.artist_url
|
||||
ol.artist_name,
|
||||
ol.artist_art,
|
||||
ol.artist_url
|
||||
ORDER BY
|
||||
plays DESC;
|
||||
plays DESC;
|
||||
|
||||
|
|
Reference in a new issue