@torrent-tv/proxy 2.9.59 → 2.9.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/services/hls-session-manager.js +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 2.9.60
|
|
2
|
+
|
|
3
|
+
- **Fix**: Seeking restarted the encoder at the position it was **already encoding**, destroying the very work being waited for — visible in the field log 2026-08-02 as `restart at #865` twice within ten seconds, each killing a run that was encoding #865. While the target segment is being produced the player keeps re-requesting it, and every such request looks "far" from where the encoder USED to be, so each one re-triggered a restart at the position we had only just moved to; playback data kept appearing and vanishing, and a seek only completed when a segment happened to reach the player before the next restart. A settled seek whose target equals the current runs start index is now ignored outright. This is distinct from the 2.9.58 guard, which only decides whether to let the current run finish its first segment — not whether a new run is needed at all; that guard behaved correctly here (it logged `run produced 4.5s (first segment done)`) and still let the pointless restart through.
|
|
4
|
+
|
|
1
5
|
## 2.9.59
|
|
2
6
|
|
|
3
7
|
- **Chore**: Diagnostics for seek handling. The session-start line now carries the proxy version (`transcode <id> start (proxy 2.9.59) "<file>"`), so a field report answers "is the host running the build I published?" by itself. And the seek restart guard added in 2.9.58 now states its decision: either `seek #N HELD — current run has produced Xs of the Ys first segment` or, on the restart line, why it was allowed (`run is dead` / `run produced Xs (first segment done)` / `grace expired`). Previously a permitted restart was indistinguishable in the log from the runaway ping-pong the guard exists to stop, which made diagnosing "seek still did not work" guesswork.
|
package/package.json
CHANGED
|
@@ -2013,6 +2013,23 @@ export class HlsSessionManager {
|
|
|
2013
2013
|
session.seekFirstFarAt = 0;
|
|
2014
2014
|
return;
|
|
2015
2015
|
}
|
|
2016
|
+
// Already encoding exactly this position — there is nothing to seek TO, so
|
|
2017
|
+
// restarting can only destroy the very work being waited for. The player
|
|
2018
|
+
// keeps re-requesting the target segment while it is still being produced,
|
|
2019
|
+
// and every such request looks "far" from where the encoder USED to be, so
|
|
2020
|
+
// without this check each one re-triggered a restart at the position we had
|
|
2021
|
+
// only just moved to: field log 2026-08-02 shows `restart at #865` twice in
|
|
2022
|
+
// ten seconds, each killing a run that was encoding #865. The guard below
|
|
2023
|
+
// did not catch it — it only decides whether to let the current run finish,
|
|
2024
|
+
// not whether a new run is needed at all.
|
|
2025
|
+
if (target === session.encodeStartIndex && session.ffmpeg != null && !hasChildExited(session.ffmpeg)) {
|
|
2026
|
+
logger.info(
|
|
2027
|
+
`transcode ${session.id} seek #${target} ignored — the current run already starts there`
|
|
2028
|
+
);
|
|
2029
|
+
session.seekTarget = null;
|
|
2030
|
+
session.seekFirstFarAt = 0;
|
|
2031
|
+
return;
|
|
2032
|
+
}
|
|
2016
2033
|
// Minimum gap between actual restarts (the settle already collapses bursts;
|
|
2017
2034
|
// this only guards back-to-back seeks). If still cooling down, re-arm once
|
|
2018
2035
|
// for the remaining cooldown instead of restarting now.
|