@torrent-tv/proxy 2.105.8 → 2.105.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torrent-tv/proxy",
3
- "version": "2.105.8",
3
+ "version": "2.105.9",
4
4
  "description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "repository": {
@@ -291,8 +291,9 @@ export class EncodeRuns {
291
291
  const endedAt = performance.now();
292
292
  run.firstWaitTraceInputAt = endedAt;
293
293
  const { sourceKey, process } = run.waitTraceInput ?? {};
294
+ const startedAt = run.waitTraceInput?.startedAt;
294
295
  this.#host.observeWait?.(sourceKey, "process", { process, phase: "end", runToken, fileIndex, bytes,
295
- startedAt: run.startedAt, endedAt, durationMs: endedAt - run.startedAt });
296
+ startedAt, endedAt, durationMs: Number.isFinite(startedAt) ? endedAt - startedAt : null });
296
297
  const f2Process = process === "F1.a" ? "F2.a" : "F2.v";
297
298
  run.waitTraceInput.f2Process = f2Process;
298
299
  run.waitTraceInput.f2StartedAt = endedAt;
@@ -1290,9 +1291,10 @@ export class EncodeRuns {
1290
1291
  }
1291
1292
  });
1292
1293
  const f1Process = session.spec.carries === "audio-only" ? "F1.a" : "F1.v";
1293
- run.waitTraceInput = { sourceKey: session.file.sourceKey, process: f1Process };
1294
+ const f1StartedAt = performance.now();
1295
+ run.waitTraceInput = { sourceKey: session.file.sourceKey, process: f1Process, startedAt: f1StartedAt };
1294
1296
  this.#host.observeWait?.(session.file.sourceKey, "process", { process: f1Process,
1295
- phase: "begin", runToken: inputToken, startedAt: run.startedAt, output: session.outputKey,
1297
+ phase: "begin", runToken: inputToken, startedAt: f1StartedAt, output: session.outputKey,
1296
1298
  from: run.from, to: run.to });
1297
1299
  if (admittedInput.original) {
1298
1300
  run.originalInput = admittedInput;