Intro skip: MAL timings via keyless Jikan + player button

- upstream: _intros(mal_id) -> per-episode {start,length} (seconds),
  30d TTL cache; Jikan is down or show uncovered -> [] (no button)
- app: GET /api/intros/{mal_id}, never errors into the player
- player: 'skip intro' pill appears while currentTime is inside the
  intro window (+8s grace); click seeks past; reappears if rewound.
  Ep-1 intros are often missing in MAL data, so falls back to the
  show's first known timing (usually identical across eps)
- test: _parse_intros unit test (Jikan itself is 504ing right now,
  live path verified by hand: endpoint returns [] cleanly)
This commit is contained in:
jozamudi committed 2026-08-30 21:01:24 +00:00
1 parent c2461f8fba
commit 0613cf7e27
5 files changed
+77 -1

No files matched your search

+3
View File
@@ -110,6 +110,9 @@ h2 { margin: 0.4rem 0; }
.player { position: relative; }
.player video { width: 100%; max-height: 70vh; background: #000; border-radius: 10px; aspect-ratio: 16/9; }
.skip-intro { position: absolute; right: .8rem; bottom: 3rem; z-index: 2;
padding: .4rem 1rem; border-radius: 99px; border: 1px solid var(--acc);
background: rgba(14, 15, 19, .85); color: var(--fg); font-size: .9rem; cursor: pointer; }
.controls { display: flex; align-items: center; gap: 0.4rem; margin: 0.6rem 0; flex-wrap: wrap; }
button { background: var(--card); color: var(--fg); border: 1px solid var(--bd);
border-radius: 8px; padding: 0.4rem 0.7rem; cursor: pointer; }