mlbserver 2024.10.10 → 2024.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 +1 -1
- package/package.json +1 -1
- package/session.js +8 -5
package/index.js
CHANGED
|
@@ -1865,7 +1865,7 @@ app.get('/', async function(req, res) {
|
|
|
1865
1865
|
if ( (currentTime >= startTime) ) {
|
|
1866
1866
|
let querystring
|
|
1867
1867
|
if ( cache_data.dates[0].games[j].teams['home'].team.league.id == session.getLidomId() ) {
|
|
1868
|
-
querystring = '?event=' + encodeURIComponent(cache_data.dates[0].games[j].teams['home'].team.
|
|
1868
|
+
querystring = '?event=' + encodeURIComponent(cache_data.dates[0].games[j].teams['home'].team.shortName.toUpperCase())
|
|
1869
1869
|
} else {
|
|
1870
1870
|
querystring = '?gamePk=' + gamePk
|
|
1871
1871
|
}
|
package/package.json
CHANGED
package/session.js
CHANGED
|
@@ -2315,7 +2315,7 @@ class sessionClass {
|
|
|
2315
2315
|
let streamMediaType = 'Video'
|
|
2316
2316
|
let stream = server + '/stream.m3u8?team=' + encodeURIComponent(team) + '&mediaType=' + streamMediaType
|
|
2317
2317
|
if ( league_id == LIDOM_ID ) {
|
|
2318
|
-
stream = server + '/stream.m3u8?event=' + encodeURIComponent(cache_data.dates[i].games[j].teams['home'].team.
|
|
2318
|
+
stream = server + '/stream.m3u8?event=' + encodeURIComponent(cache_data.dates[i].games[j].teams['home'].team.shortName.toUpperCase()) + '&mediaType=' + streamMediaType
|
|
2319
2319
|
}
|
|
2320
2320
|
stream += '&level=' + encodeURIComponent(this.getLevelNameFromSportId(sportId))
|
|
2321
2321
|
stream += '&resolution=' + resolution
|
|
@@ -3371,16 +3371,19 @@ class sessionClass {
|
|
|
3371
3371
|
if ( eventList ) {
|
|
3372
3372
|
for (var i=0; i<eventList.length; i++) {
|
|
3373
3373
|
if ( eventList[i].fields && eventList[i].fields.blurb && eventList[i].fields.url ) {
|
|
3374
|
-
if ( !eventList[i].fields.blurb.
|
|
3374
|
+
if ( !eventList[i].fields.blurb.includes('LIVE') ) {
|
|
3375
3375
|
break
|
|
3376
3376
|
} else {
|
|
3377
3377
|
if ( eventList[i].title ) {
|
|
3378
3378
|
if ( (eventName == 'BIGINNING') && eventList[i].title.startsWith('LIVE') && eventList[i].title.includes('Big Inning') ) {
|
|
3379
3379
|
this.debuglog('active big inning url')
|
|
3380
3380
|
return eventList[i].fields.url
|
|
3381
|
-
} else
|
|
3382
|
-
|
|
3383
|
-
|
|
3381
|
+
} else {
|
|
3382
|
+
let cleaned_title = eventList[i].title.normalize('NFD').replace(/[\u0300-\u036f]/g, '').toUpperCase()
|
|
3383
|
+
if ( cleaned_title.endsWith(' VS. ' + eventName) || cleaned_title.includes(eventName + ' VS. ') ) {
|
|
3384
|
+
this.debuglog('active ' + eventName + ' url')
|
|
3385
|
+
return eventList[i].fields.url
|
|
3386
|
+
}
|
|
3384
3387
|
}
|
|
3385
3388
|
}
|
|
3386
3389
|
}
|