Unify catalog navigation and playlist editing, align track actions and repair listening totals
Build and Publish / Build and Publish Docker Image (push) Successful in 3m58s

This commit is contained in:
ab committed 2026-11-24 01:39:34 +02:00
1 parent 3f5fbdd05a
commit b584e660a4
44 files changed
+2192 -515

No files matched your search

+12 -5
View File
@@ -1,5 +1,12 @@
SELECT COALESCE(t.cover_file_id, album.cover_file_id) FROM furumusic__playlist_track pt
JOIN furumusic__track t ON t.id = pt.track_id AND NOT t.is_hidden
JOIN furumusic__release album ON album.id = t.release_id AND NOT album.is_hidden
WHERE pt.playlist_id = p.id AND COALESCE(t.cover_file_id, album.cover_file_id) IS NOT NULL
ORDER BY pt.position, pt.id LIMIT 1
SELECT CASE
WHEN p.cover_hash IS NOT NULL THEN ARRAY['/api/player/playlists/' || p.id || '/cover?v=' || p.cover_hash]
WHEN p.cover_file_id IS NOT NULL THEN ARRAY['/api/player/cover/' || p.cover_file_id || '/small']
ELSE (
SELECT COALESCE((array_agg(url ORDER BY choice) FILTER (WHERE choice IS NOT NULL))[1:4],
(array_agg(url ORDER BY position, item_id) FILTER (WHERE automatic))[1:4], ARRAY[]::text[])
FROM (
SELECT '/api/player/cover/' || art || '/small' AS url,
array_position(p.cover_ids, art) AS choice, position, item_id, automatic
FROM ({candidates}) options
) ranked
) END AS urls