@torrent-tv/proxy 2.23.0 → 2.24.1

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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## 2.24.1
2
+
3
+ - **Fix**: Seeking could leave a film dead. After a seek the encoder restarts at the segment before the target, and every segment it then produces states its own position, read out of the piece. On a file whose container index is wrong those positions disagree with the playlist the player is holding — measured 2026-08-17, a seek to 1590.4 s produced audio segments #292 and #293 carrying 1587.892 s and 1592.692 s against a playlist saying 1585.376 s and 1590.585 s. A fragment landing further from where the playlist put it than a player will bridge (hls.js bridges `maxBufferHole`, 0.5 s by default) is not recognised as buffered, so the browser asks for it again: those two segments were fetched **1908 times each over ten minutes**, every one served in 4 ms, with the picture frozen and nothing in either log saying why. A segment is now stamped where the playlist the player holds says it begins, whenever the piece's own figure is further away than that; within it the piece's own figure is kept, which is what keeps speech and subtitles together on a file whose index is slightly out. The boundary table goes on being corrected from produced segments — that is what lets a re-encoded step be cut like the copy it joins — but the correction no longer moves segments under a player holding the original playlist: the published table is frozen when the playlist text is written from it. Pinned by `test/published-timeline.test.js` with the field figures.
4
+
5
+ ## 2.24.0
6
+
7
+ - **New**: The budget's two remaining holes are closed, which is the rest of roadmap item 6. A soundtrack published on its own is a second encoder running for as long as the picture does, and it was charged at nothing; a picture being RE-ENCODED beside the step being judged — which is what every quality switch does, two encoders on purpose — was charged at nothing too. Both are priced now: the soundtrack from its own measured speed, the second picture from what it was last seen doing alone, falling back to the same model that judges every step. Nothing is charged for an encode nobody has measured and no model can price: a guess there would refuse steps on arithmetic no one performed.
8
+ - **Fix**: A soundtrack could never have been priced as shipped. Four things each made it impossible: the reading path refused renditions a measurement outright, the only call that would have filed one sat behind a guard its caller had already made, a family never contained its renditions at all — so every sum over the family missed them — and the rule that a price may only be learned from an encoder alone on the machine excludes a rendition by construction, since it runs for exactly as long as the picture it accompanies. All four found by review before release. A soundtrack's share is now recovered by subtracting what the machine is already known to be spending, which is the same arithmetic that recovers a source's decoding from a running encoder, and only when every other running encode has a price — unpriced work must never land in the soundtrack's account, because an overpriced soundtrack refuses steps the host could hold.
9
+ - **Fix**: A quality step being warmed was charged its own cost while being judged, so the step the viewer had just asked for was dropped from the offer by the act of warming it — and with every route guard reading that list, its next segment would answer 404 on a stream that was playing. On the field figures of 2026-08-15 that is 1.83x judged as 1.03x. A height is now judged against what the machine spends on everything EXCEPT it.
10
+ - **Fix**: A speed measured while the torrent was what was short is no longer filed as an encode's price. It was recorded before the check that exists to reject it, so a run starved for twenty seconds priced itself at three seconds of work per second of video — more than the machine has — and every other step was refused on the download's account.
11
+ - **Fix**: The "not offering" line is written when the ANSWER changes, not every time it is recomputed — this is asked on the path that serves every playlist, init and segment, so an unconditional line was about seven hundred identical lines an hour into a log buffer that holds five hundred.
12
+ - **Fix**: A speed measured before a downshift no longer prices the encode that replaced it. It described a picture the session had stopped producing, and it kept the step it was measured on withdrawn from the offer although nothing was producing that step any more.
13
+ - **Fix**: The offered list is recomputed when what an encoder was last seen doing changes. That figure both withdraws a step measured below realtime and prices every running picture, and it was missing from what identifies a cached answer — on a COPIED picture nothing else in the key ever moves, so the menu could stay pinned to what was computed before anything had been measured. It enters the key as the two decisions it feeds — below realtime or not, and the cost rounded — rather than as a raw speed, which moves on every reading and would defeat the cache on the hottest path in the proxy.
14
+
1
15
  ## 2.23.0
2
16
 
3
17
  - **New**: The encoder run is a transition table, and the table is the specification rather than a description of code written elsewhere. `services/encode-run-state.js` declares eight states, ten events named for what happened, two superstates and the answers each state gives — whether the input is being read, whether the process can be signalled, what a missing segment gets, what the browser is told, whether a restart is allowed. What it buys is not tidiness: five field failures in a row were empty cells — a pair of state and event nobody had considered — and a table makes an empty cell visible before a release. The edges that must NEVER exist are data too, each naming the release it cost: the 2.9.93 sawtooth where any segment request released a suspended encoder, and the 2.9.93 dead-run shortcut where the handle pointed at a corpse and every later seek was waved through as already covered.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torrent-tv/proxy",
3
- "version": "2.23.0",
3
+ "version": "2.24.1",
4
4
  "description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "publishConfig": {