Skip to main content

## TRUNCATED_STREAM_TOLERANCE_SECS

# Constant TRUNCATED_STREAM_TOLERANCE_SECS

Source

    pub const TRUNCATED_STREAM_TOLERANCE_SECS: f64 = 10.0;

Expand description

How far short of the item’s runtime a stream may end and still count as a natural finish.

Sized to swallow the two sources of slack in the comparison — the position poll is up to 250 ms stale, and Jellyfin’s reported runtime can disagree with the transcoded output by a second or two — while staying far below the minutes-long gap a dropped connection leaves. Erring long is the safe direction: a false “finished” is the bug we are fixing, whereas a false “truncated” only re-opens the stream for its last few seconds and then ends again normally.