feat: playlists with a cover, a collage of the covers of their albums

- A playlist says which albums stand for it (album_ids): up to 4 albums that have a cover, in the order they first appear in it, each once, read for a whole page of playlists in one query. An empty one has an empty list.
- The Playlists page is a grid of cards with the collage, and the page of a playlist shows it in its header. The pages of a smart playlist and of a suggested one show a collage of the albums of their first songs.
- Nothing is fetched for it: the covers are the ones the library already has.
This commit is contained in:
tgiachi 2026-11-13 11:32:01 +01:00
commit a1e192066c

View file

@ -3856,7 +3856,7 @@ components:
Playlist:
type: object
additionalProperties: false
required: [id, name, description, track_count, duration_ms, created_at, updated_at]
required: [id, name, description, track_count, duration_ms, created_at, updated_at, album_ids]
properties:
id: {type: integer, format: int64}
name: {type: string}
@ -3865,6 +3865,14 @@ components:
duration_ms: {type: integer, format: int64, description: "Their total length."}
created_at: {type: string, format: date-time}
updated_at: {type: string, format: date-time, description: "When it was last changed, tracks included."}
album_ids:
type: array
maxItems: 4
items: {type: integer, format: int64}
description: |
Up to 4 albums that have a cover and stand for the playlist, in the order they first appear in it, each once:
their covers (`GET /albums/{id}/cover`) make the picture of the playlist. Empty when none of its songs has
an album with a cover.
PlaylistPage:
type: object