mlbserver 2026.5.26 → 2026.5.27
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/index.js +13 -14
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1277,17 +1277,14 @@ app.get('/gamechangerplaylist.m3u8', async function(req, res) {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
}
|
|
1279
1279
|
if ( key && iv ) {
|
|
1280
|
+
let ts
|
|
1281
|
+
let extinf
|
|
1280
1282
|
for (var i=(body.length-1); i>=0; i--) {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
if ( body[i
|
|
1285
|
-
|
|
1286
|
-
extinf = body[i+j]
|
|
1287
|
-
} else if ( !ts && !body[i+j].startsWith('#') ) {
|
|
1288
|
-
ts = url.resolve(u, body[i+j])
|
|
1289
|
-
}
|
|
1290
|
-
if ( extinf && ts ) break;
|
|
1283
|
+
if ( body[i] ) {
|
|
1284
|
+
if ( !extinf && body[i].startsWith('#EXTINF') ) {
|
|
1285
|
+
extinf = body[i]
|
|
1286
|
+
} else if ( !ts && !body[i].startsWith('#') ) {
|
|
1287
|
+
ts = url.resolve(u, body[i])
|
|
1291
1288
|
}
|
|
1292
1289
|
}
|
|
1293
1290
|
if ( extinf && ts && !new_segments_complete ) {
|
|
@@ -1309,10 +1306,12 @@ app.get('/gamechangerplaylist.m3u8', async function(req, res) {
|
|
|
1309
1306
|
} else {
|
|
1310
1307
|
new_segments.unshift({'key':key, 'iv':iv, 'extinf':extinf, 'ts':ts, 'streamURLToken':streamURLToken})
|
|
1311
1308
|
}
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1309
|
+
segment_count++
|
|
1310
|
+
ts = false
|
|
1311
|
+
extinf = false
|
|
1312
|
+
if ( new_segments_complete ) {
|
|
1313
|
+
break
|
|
1314
|
+
}
|
|
1316
1315
|
}
|
|
1317
1316
|
}
|
|
1318
1317
|
}
|