@torrent-tv/proxy 2.100.6 → 2.100.7
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
|
@@ -855,7 +855,12 @@ export class ViewerRequests {
|
|
|
855
855
|
const segments = [];
|
|
856
856
|
for (let index = 0; index < count; index++) {
|
|
857
857
|
const endSeconds = timeline.publishedStartOf(index + 1);
|
|
858
|
-
|
|
858
|
+
// Only a made piece has media intervals to read. Asked of every piece,
|
|
859
|
+
// each one not made cost a `stat` of its file in the store's safety net
|
|
860
|
+
// for a missed directory event: 1327 per poll per output, 12.6 s of 300 s
|
|
861
|
+
// of the main thread at a cold start on Home Assistant (r61,
|
|
862
|
+
// torrent-tv/meta#178), while requests waited behind it.
|
|
863
|
+
const ranges = inventory.has(index) ? this.#host.encodeRuns.finishedMediaRangesOf(output, index) : undefined;
|
|
859
864
|
const mediaRanges = ranges && output.segmentFormat?.servedMediaRanges ?
|
|
860
865
|
output.segmentFormat.servedMediaRanges(ranges, { initBytes: sessionInit }) : undefined;
|
|
861
866
|
if (index !== 0 && mediaRanges === undefined && !inventory.has(index) &&
|