@torrent-tv/proxy 2.43.0 → 2.43.2
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 +12 -0
- package/package.json +2 -2
- package/routes/api/subtitles/get.js +21 -3
- package/services/hls-session-manager.js +8221 -8171
- package/test/tracks-begin-together.test.js +27 -0
|
@@ -39,6 +39,7 @@ function familyAtBoundaryTwo() {
|
|
|
39
39
|
runState: ENCODE_RUN_STATE.PRODUCING,
|
|
40
40
|
segmentBoundaries: [...BOUNDARIES],
|
|
41
41
|
encodeStartIndex: 2,
|
|
42
|
+
runSerial: 0,
|
|
42
43
|
audioRenditionSessions: new Map([[1, "sound"]]),
|
|
43
44
|
indexCheck: null
|
|
44
45
|
};
|
|
@@ -112,3 +113,29 @@ test("a member that is not running is left alone", () => {
|
|
|
112
113
|
assert.equal(sound.runState, ENCODE_RUN_STATE.STOPPED);
|
|
113
114
|
assert.notEqual(INITIAL_RUN_STATE, ENCODE_RUN_STATE.STOPPED);
|
|
114
115
|
});
|
|
116
|
+
|
|
117
|
+
test("a soundtrack does not move the grid the picture is cut on", () => {
|
|
118
|
+
const { manager, picture, sound } = familyAtBoundaryTwo();
|
|
119
|
+
const pictureBefore = [...picture.segmentBoundaries];
|
|
120
|
+
const soundBefore = [...sound.segmentBoundaries];
|
|
121
|
+
|
|
122
|
+
// The sound reports where IT began, which is where it was asked to begin, to
|
|
123
|
+
// within one audio frame. The picture's own boundary is a keyframe of the
|
|
124
|
+
// file and can be seconds away from that — both readings correct, about
|
|
125
|
+
// different things.
|
|
126
|
+
//
|
|
127
|
+
// Field 2026-08-20: boundary #521 of one film was corrected 2086.084 →
|
|
128
|
+
// 2084.082 by the picture and 2084.082 → 2086.033 by the sound 1.6 s later,
|
|
129
|
+
// 1.951 s apart, each overwriting the other for as long as the film ran. The
|
|
130
|
+
// table never converged, so the guard that stops a correction the table
|
|
131
|
+
// already holds never fired.
|
|
132
|
+
manager.correctBoundaryFromSegment(sound, 2, 10.5);
|
|
133
|
+
|
|
134
|
+
assert.deepEqual(
|
|
135
|
+
picture.segmentBoundaries,
|
|
136
|
+
pictureBefore,
|
|
137
|
+
"the grid is the picture's cut list and a soundtrack may not move it"
|
|
138
|
+
);
|
|
139
|
+
assert.deepEqual(sound.segmentBoundaries, soundBefore);
|
|
140
|
+
assert.equal(picture.runSerial, 0, "and nothing is restarted on a soundtrack's say-so");
|
|
141
|
+
});
|