mlbserver 2026.5.26 → 2026.7.20

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.
Files changed (2) hide show
  1. package/index.js +14 -14
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1248,6 +1248,7 @@ app.get('/gamechangerplaylist.m3u8', async function(req, res) {
1248
1248
  session.debuglog(game_changer_title + 'checking for new segments')
1249
1249
  let u = streamURL + '_' + GAMECHANGER_RESOLUTIONS[resolution].url_bandwidth + 'K.m3u8'
1250
1250
  headers['x-cdn-token'] = streamURLToken
1251
+ headers.gzip = true
1251
1252
  requestRetry(u, headers, function(err, response) {
1252
1253
  session.debuglog(game_changer_title + 'requested ' + u)
1253
1254
  if (err) return res.error(err)
@@ -1277,17 +1278,14 @@ app.get('/gamechangerplaylist.m3u8', async function(req, res) {
1277
1278
  }
1278
1279
  }
1279
1280
  if ( key && iv ) {
1281
+ let ts
1282
+ let extinf
1280
1283
  for (var i=(body.length-1); i>=0; i--) {
1281
- let ts
1282
- let extinf
1283
- for (var j=1; j<=4; j++) {
1284
- if ( body[i+j] ) {
1285
- if ( !extinf && body[i+j].startsWith('#EXTINF') ) {
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;
1284
+ if ( body[i] ) {
1285
+ if ( !extinf && body[i].startsWith('#EXTINF') ) {
1286
+ extinf = body[i]
1287
+ } else if ( !ts && !body[i].startsWith('#') ) {
1288
+ ts = url.resolve(u, body[i])
1291
1289
  }
1292
1290
  }
1293
1291
  if ( extinf && ts && !new_segments_complete ) {
@@ -1309,10 +1307,12 @@ app.get('/gamechangerplaylist.m3u8', async function(req, res) {
1309
1307
  } else {
1310
1308
  new_segments.unshift({'key':key, 'iv':iv, 'extinf':extinf, 'ts':ts, 'streamURLToken':streamURLToken})
1311
1309
  }
1312
- }
1313
- segment_count++
1314
- if ( new_segments_complete ) {
1315
- break
1310
+ segment_count++
1311
+ ts = false
1312
+ extinf = false
1313
+ if ( new_segments_complete ) {
1314
+ break
1315
+ }
1316
1316
  }
1317
1317
  }
1318
1318
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mlbserver",
3
- "version": "2026.5.26",
3
+ "version": "2026.7.20",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",