fix: retain Zoko opening and ending metadata through playback

This commit is contained in:
2026-10-25 23:01:38 +01:00
parent d8fb648c90
commit 41aa0abd56
11 changed files with 341 additions and 24 deletions
+5 -3
View File
@@ -9,12 +9,14 @@
```
Values are seconds. Verified on Cowboy Bebop episode 1—including `/stream/mal/1/1/sub`, the actual resolver path—and Attack on Titan S3 Part 2 episode 1.
**Current gaps**
- `ZokoResolver.swift`: `parse` decodes only `src` and `subtitles`, discarding `skip`.
- `TerebiApp.swift`: `replaceMetadata(for:)` only acquires intervals for `miruro:` identities.
**Status: implemented locally.**
- `ZokoResolver.swift` retains optional, independently decoded provider intervals through resolution and source preparation.
- `TerebiApp.swift` feeds `anilist:` provider intervals into the existing metadata/display lifecycle without a Miruro lookup.
**Requested change:** retain optional provider intervals through resolution/source preparation and feed the existing metadata/display lifecycle for `anilist:` identities. No Tubular changes, Miruro lookup, or external timing service needed.
**Acceptance:** preserve fractional seconds; validate finite, nonnegative, ordered boundaries against actual media duration; missing/malformed intervals must not block playback. Clear stale intervals on media replacement and retain cancellation/generation guards. Cover direct launches, queues, and saved-episode reopening without changing existing display/skip policy.
**Verification:** `make check-zoko check-zoko-intervals check-source check-miruro-metadata all` and `.build/resolved-playback-check --metadata-lifecycle` passed. Local native playback covers direct/sidebar launches, fractional bands/manual skip, saved fresh-model reopening, queues/revisits, invalid/missing timing and stale source/metadata rejection. Visual rendering and live-provider alignment still need a user check.
**Evidence:** [research note](docs/miruro-segments.md#current-provider-investigation-2026-10-25). Metadata verified; player rendering and timestamp alignment were not.