mlbserver 2025.10.16 → 2025.10.17
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 +9 -4
- package/package.json +1 -1
- package/session.js +5 -3
package/index.js
CHANGED
|
@@ -319,9 +319,13 @@ app.get('/stream.m3u8', async function(req, res) {
|
|
|
319
319
|
streamURL = req.query.highlight_src
|
|
320
320
|
} else if ( req.query.event ) {
|
|
321
321
|
if ( req.query.league_id ) {
|
|
322
|
-
|
|
322
|
+
if ( req.query.league_id == session.getAFLid() ) {
|
|
323
|
+
streamURL = await session.getAFLStreamURL(req.query.event.toUpperCase())
|
|
324
|
+
} else {
|
|
325
|
+
streamURL = await session.getEventStreamURL(req.query.event.toUpperCase(), false, req.query.league_id)
|
|
326
|
+
}
|
|
323
327
|
} else {
|
|
324
|
-
streamURL = await session.
|
|
328
|
+
streamURL = await session.getEventStreamURL(req.query.event.toUpperCase())
|
|
325
329
|
}
|
|
326
330
|
} else {
|
|
327
331
|
if ( req.query.gamePk ) {
|
|
@@ -2096,10 +2100,11 @@ app.get('/', async function(req, res) {
|
|
|
2096
2100
|
if ( session.getAFLid() == cache_data.dates[0].games[j].teams['home'].team.league.id ) {
|
|
2097
2101
|
querystring = '?event=' + encodeURIComponent(cache_data.dates[0].games[j].teams['home'].team.abbreviation.toUpperCase())
|
|
2098
2102
|
} else if ( session.getLMPid() == cache_data.dates[0].games[j].teams['home'].team.league.id ) {
|
|
2099
|
-
querystring = '?event=' + encodeURIComponent(cache_data.dates[0].games[j].teams['home'].team.name.split(' ')[0].toUpperCase())
|
|
2103
|
+
querystring = '?event=' + encodeURIComponent(cache_data.dates[0].games[j].teams['home'].team.name.split(' ')[0].toUpperCase())
|
|
2100
2104
|
} else {
|
|
2101
|
-
querystring = '?event=' + encodeURIComponent(cache_data.dates[0].games[j].teams['home'].team.shortName.toUpperCase())
|
|
2105
|
+
querystring = '?event=' + encodeURIComponent(cache_data.dates[0].games[j].teams['home'].team.shortName.toUpperCase())
|
|
2102
2106
|
}
|
|
2107
|
+
querystring += '&league_id=' + cache_data.dates[0].games[j].teams['home'].team.league.id
|
|
2103
2108
|
} else {
|
|
2104
2109
|
querystring = '?gamePk=' + gamePk
|
|
2105
2110
|
}
|
package/package.json
CHANGED
package/session.js
CHANGED
|
@@ -2354,13 +2354,15 @@ class sessionClass {
|
|
|
2354
2354
|
let stream = server + '/stream.m3u8?team=' + encodeURIComponent(team) + '&mediaType=' + streamMediaType
|
|
2355
2355
|
if ( WINTER_LEAGUES.includes(league_id) ) {
|
|
2356
2356
|
if ( league_id == AFL_ID ) {
|
|
2357
|
-
stream = server + '/stream.m3u8?event=' + encodeURIComponent(cache_data.dates[i].games[j].teams['home'].team.abbreviation.toUpperCase())
|
|
2357
|
+
stream = server + '/stream.m3u8?event=' + encodeURIComponent(cache_data.dates[i].games[j].teams['home'].team.abbreviation.toUpperCase())
|
|
2358
2358
|
} else if ( league_id == LMP_ID ) {
|
|
2359
|
-
stream = server + '/stream.m3u8?event=' + encodeURIComponent(cache_data.dates[i].games[j].teams['home'].team.name.split(' ')[0].toUpperCase())
|
|
2359
|
+
stream = server + '/stream.m3u8?event=' + encodeURIComponent(cache_data.dates[i].games[j].teams['home'].team.name.split(' ')[0].toUpperCase())
|
|
2360
2360
|
} else {
|
|
2361
|
-
stream = server + '/stream.m3u8?event=' + encodeURIComponent(cache_data.dates[i].games[j].teams['home'].team.shortName.toUpperCase())
|
|
2361
|
+
stream = server + '/stream.m3u8?event=' + encodeURIComponent(cache_data.dates[i].games[j].teams['home'].team.shortName.toUpperCase())
|
|
2362
2362
|
}
|
|
2363
|
+
stream += '&league_id=' + league_id
|
|
2363
2364
|
}
|
|
2365
|
+
stream += '&mediaType=' + streamMediaType
|
|
2364
2366
|
stream += '&level=' + encodeURIComponent(this.getLevelNameFromSportId(sportId))
|
|
2365
2367
|
stream += '&resolution=' + resolution
|
|
2366
2368
|
if ( this.protection.content_protect ) stream += '&content_protect=' + this.protection.content_protect
|