@torrent-tv/proxy 2.107.85 → 2.107.87
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
|
@@ -1156,9 +1156,13 @@ export class EncodeRuns {
|
|
|
1156
1156
|
startSeconds,
|
|
1157
1157
|
// Where piece `index` ends on the timeline `startSeconds` is taken from:
|
|
1158
1158
|
// the speed reading is the film between two such ends (torrent-tv/meta#414).
|
|
1159
|
-
pieceEndSeconds: (index) =>
|
|
1160
|
-
|
|
1161
|
-
|
|
1159
|
+
pieceEndSeconds: (index) => {
|
|
1160
|
+
const count = session.timeline.segmentCount;
|
|
1161
|
+
if (!Number.isInteger(index) || index < 0 || index >= count) return null;
|
|
1162
|
+
return index + 1 < count
|
|
1163
|
+
? session.timeline.publishedStartOf(index + 1)
|
|
1164
|
+
: Number(session.file.durationSeconds) || null;
|
|
1165
|
+
},
|
|
1162
1166
|
totalSeconds: Number(session.file.durationSeconds) || null,
|
|
1163
1167
|
spawn: (spawnArgs) =>
|
|
1164
1168
|
spawn(this.#host.ffmpegBin, spawnArgs, {
|