mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
Replace the resolve-track loader's fused reload gate (`isResolvedTrack(track) && epoch <= lastLoadedEpoch`) and its `let lastLoadedEpoch` closure-local with a pure `shouldResolveTrack` predicate keyed off `Track.duration` completeness: unresolved → load, resolved-but-incomplete → reload, resolved + complete → reuse. A switch to a resolved-but-incomplete live track now eagerly re-fetches (its window may have slid past the playhead), which is what makes the last-serviced memory unnecessary — every effect re-fire is a legitimate load, with in-flight dedup and the peeked presentation preventing redundancy. The reload-epoch slot becomes purely a re-fire ping: subscribed to, never compared. Completeness via `Number.isFinite(track.duration)` is the existing single source of truth, so a live stream that hits ENDLIST stops reloading with no engine- or stream-type config. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>