feat(aniskip): detect intros and outros from file chapters and AniSkip v2

- Read mpv's chapter-list first and classify the file's own opening and
  ending (names incl. Japanese, else song-length heuristics, ported from
  Telly); ask AniSkip only for what the chapters lack. Chapter detection
  also runs for remote streams; AniSkip stays local-only.
- Query AniSkip v2 with episodeLength from mpv's duration and parse both
  op and ed. Requests are spaced at least 1 s apart.
- The skip key now skips whichever of the intro or outro is playing, with
  an outro prompt and AniSkip Outro Start/End chapter markers.
- Fix transient AniSkip/MAL failures (non-404 errors, network, timeouts)
  being cached as a definite miss; only 404s and unmatched titles are cached.
This commit is contained in:
sudacode committed 2026-11-22 02:21:17 -08:00
1 parent 0ae70b4ab2
commit 5a332e39c5
16 files changed
+844 -291

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ A few ownership notes that are hard to guess from file names:
- mpv access is split into transport (`mpv-transport.ts`), protocol (`mpv-protocol.ts`), and property modules under `src/core/services/`.
- The renderer keeps `renderer.ts` to orchestration. Keyboard, mouse, and gamepad input live in `renderer/handlers/`, and each modal flow has its own file in `renderer/modals/`.
- AniSkip intro detection runs in the app (`src/main/runtime/aniskip-runtime.ts`), which drives mpv chapters and the skip key over the mpv IPC socket. The plugin does not handle it.
- Intro/outro detection runs in the app (`src/main/runtime/aniskip-runtime.ts`), which reads the file's chapters, asks AniSkip for what they lack, and drives mpv chapters and the skip key over the mpv IPC socket. The plugin does not handle it.
## Component diagram