fix(plex): subtitles — a retried full pass resumes, a stalled track is polled slowly

A full pass that ran out of time kept what it reached, but its retry an hour
later started again at 0, so a file too big to read inside the extraction
timeout never completed. The pass now starts where every embedded track's
coverage from the head ends (less the window pre-roll, so a cue across the
join is read whole). The seek needs -avoid_negative_ts on this read as on a
window, measured on a real file: without it the cue running at the start
shifts the whole output.

A partial track whose full pass had failed never reached a settled state, so
the player polled it every 2 s for the rest of the film. The status now says
whether the track is still growing, and a stalled one is polled every 15 s —
still inside the 60 s lookahead that reads the next window before an edge.
This commit is contained in:
2026-09-19 07:07:53 +02:00
parent e6b76e156a
commit c60359bfed
5 changed files with 126 additions and 5 deletions
+2
View File
@@ -678,6 +678,8 @@ export const plexApi = {
state: "ready" | "partial" | "preparing" | "unavailable" | "failed";
code: string | null;
gen: number;
/** On `partial`/`preparing`: whether the track still fills in on its own. */
growing?: boolean;
}> =>
// `quiet`: the player reports a failed poll inline, so no global error dialog on top of it.
req(