fix: render segment overrides and skip progress

This commit is contained in:
2026-05-22 16:34:26 +02:00
parent c5c15cdabc
commit 51355a4dbc
7 changed files with 73 additions and 58 deletions

View File

@@ -27,6 +27,7 @@ export const resolveActiveSegments = (): void => {
state.activeSegments = state.parsedSegments.filter(s => {
const t = normalizeType(s.type);
if (!t) return false;
const isOverride = (s.source || '').toLowerCase() === 'override';
const len = s.end - s.start;
// duration filter
@@ -34,6 +35,9 @@ export const resolveActiveSegments = (): void => {
// bounds check
if (s.start < 0 || s.end <= s.start || s.end > bounds + 1) return false;
// User overrides should render even if they don't fit AniSkip's usual OP/ED heuristics.
if (isOverride) return true;
// intro: starts early, before 50% of video
if (t === 'op') {
return s.start <= MAX_INTRO_START && s.start <= bounds * 0.5;