@torrent-tv/proxy 2.87.9 → 2.87.10

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,7 @@
1
+ ## 2.87.10
2
+
3
+ - **Fix**: Keep sidecar metadata refresh pending when the container returns an empty track list before its header is available.
4
+
1
5
  ## 2.87.9
2
6
 
3
7
  - **Fix**: Stop refreshing late sidecar metadata when the completed header read reports no audio tracks.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torrent-tv/proxy",
3
- "version": "2.87.9",
3
+ "version": "2.87.10",
4
4
  "description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "publishConfig": {
@@ -445,7 +445,10 @@ export function createPlaybackPlanner({
445
445
  tracks: tracks
446
446
  .filter((track) => track?.type === "audio")
447
447
  .sort((left, right) => (left.declaredIndex ?? 0) - (right.declaredIndex ?? 0)),
448
- complete: Array.isArray(tracks)
448
+ // ContainerOrchestrator leaves empty reads uncached because the file
449
+ // header may not have arrived yet. Only a non-empty table proves the
450
+ // read reached the container's track list.
451
+ complete: Array.isArray(tracks) && tracks.length > 0
449
452
  }))
450
453
  .catch((error) => {
451
454
  logger.info(`audio tracks: "${label}" could not be read (${error?.message ?? error})`);
@@ -33,3 +33,11 @@ test("every field the declaration reads is a field the cache stores", () => {
33
33
  );
34
34
  }
35
35
  });
36
+
37
+ test("an empty container track list remains pending for late sidecar metadata", () => {
38
+ assert.match(
39
+ planner,
40
+ /complete: Array\.isArray\(tracks\) && tracks\.length > 0/,
41
+ "ContainerOrchestrator leaves empty track reads uncached while the header is unavailable"
42
+ );
43
+ });