Show anime progress from latest session position

- include anime ID in media detail data
- use latest session position for episode progress
- update stats UI and lookup tests
This commit is contained in:
2026-03-19 21:57:04 -07:00
parent 64a88020c9
commit 2258ededbd
11 changed files with 341 additions and 4 deletions

View File

@@ -1810,6 +1810,7 @@ export function getMediaDetail(db: DatabaseSync, videoId: number): MediaDetailRo
SELECT
v.video_id AS videoId,
v.canonical_title AS canonicalTitle,
v.anime_id AS animeId,
COALESCE(lm.total_sessions, 0) AS totalSessions,
COALESCE(lm.total_active_ms, 0) AS totalActiveMs,
COALESCE(lm.total_cards, 0) AS totalCards,

View File

@@ -425,6 +425,7 @@ export interface MediaLibraryRow {
export interface MediaDetailRow {
videoId: number;
canonicalTitle: string;
animeId: number | null;
totalSessions: number;
totalActiveMs: number;
totalCards: number;