feat(cover): show each book's cover in the shape of its primary format

Pick the face slot from the primary file's medium instead of the library's
ratio, and send that frame per book on cards, detail, notebook labels and
recommendations. Grids keep uniform tiles, and the library setting becomes
Grid shape.
This commit is contained in:
neon
2026-10-08 06:19:00 +00:00
parent bd141802bd
commit 01b5638ea7
41 changed files with 419 additions and 140 deletions
+7
View File
@@ -187,6 +187,7 @@ export type BookSeriesMembership = {
export type BookCard = {
id: number;
status: string;
/** The frame of the cover the book shows by default, which follows its primary file's medium rather than its library. */
coverAspectRatio: CoverAspectRatio;
title: string | null;
authors: string[];
@@ -315,6 +316,8 @@ export type BookDetail = {
coverSource: "extracted" | "custom" | null;
coverMedia: CoverMedium[];
covers: Record<CoverMedium, BookCoverSlot | null>;
/** The frame of the cover the book shows by default: square when that is its audiobook art. Absent from servers that predate it. */
coverAspectRatio?: CoverAspectRatio;
coverVersion: string;
hardcoverEditionId: string | null;
providerIds: ProviderIds;
@@ -437,6 +440,8 @@ export type BookRecommendation = {
title: string | null;
coverAspectRatio: CoverAspectRatio;
updatedAt: string | null;
/** The book card's cover cache key. Absent from servers that predate it, where `updatedAt` serves. */
coverVersion?: string;
hasCover: boolean;
authors: string[];
readStatus: UserBookStatus | null;
@@ -452,6 +457,8 @@ export type SeriesBookRecommendation = {
title: string | null;
coverAspectRatio: CoverAspectRatio;
updatedAt: string | null;
/** The book card's cover cache key. Absent from servers that predate it, where `updatedAt` serves. */
coverVersion?: string;
seriesIndex: SeriesIndex | null;
hasCover: boolean;
authors: string[];