mlbserver 2026.2.23 → 2026.3.15

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 (3) hide show
  1. package/index.js +33 -2
  2. package/package.json +1 -1
  3. package/session.js +36 -1
package/index.js CHANGED
@@ -1684,6 +1684,33 @@ app.get('/', async function(req, res) {
1684
1684
  let currentDate = new Date()
1685
1685
 
1686
1686
  let entitlements = await session.getEntitlements()
1687
+
1688
+ // MASN live stream for entitled subscribers
1689
+ try {
1690
+ if ( entitlements.includes('MASN_110') ) {
1691
+ body += '<tr><td><span class="tooltip">MASN<span class="tooltiptext">MASN live stream for entitled subscribers. <a href="https://support.mlb.com/s/article/MASN-In-Market-Offering">See here for more information</a>.</span></span></td><td>'
1692
+ let querystring = '?event=MASN'
1693
+ let multiviewquerystring = querystring + '&resolution=' + DEFAULT_MULTIVIEW_RESOLUTION
1694
+ if ( linkType == VALID_LINK_TYPES[0] ) {
1695
+ if ( startFrom != VALID_START_FROM[0] ) querystring += '&startFrom=' + startFrom
1696
+ if ( controls != VALID_CONTROLS[0] ) querystring += '&controls=' + controls
1697
+ }
1698
+ if ( resolution != VALID_RESOLUTIONS[0] ) querystring += '&resolution=' + resolution
1699
+ if ( linkType == VALID_LINK_TYPES[1] ) {
1700
+ if ( force_vod != VALID_FORCE_VOD[0] ) querystring += '&force_vod=' + force_vod
1701
+ } else if ( linkType == VALID_LINK_TYPES[4] ) {
1702
+ querystring += '&filename=' + gameDate + ' MASN'
1703
+ }
1704
+ querystring += content_protect_b
1705
+ multiviewquerystring += content_protect_b
1706
+ body += '<a href="' + thislink + querystring + '">MASN</a>'
1707
+ body += '<input type="checkbox" value="http://127.0.0.1:' + session.data.port + '/stream.m3u8' + multiviewquerystring + '" onclick="addmultiview(this)">'
1708
+ body += '</td></tr>' + "\n"
1709
+ } // end entitlements check
1710
+ } catch (e) {
1711
+ session.debuglog('MASN detect error : ' + e.message)
1712
+ }
1713
+
1687
1714
  // MLB Network live stream for eligible USA subscribers
1688
1715
  try {
1689
1716
  if ( entitlements.includes('MLBN') || entitlements.includes('EXECMLB') || entitlements.includes('MLBTVMLBNADOBEPASS') ) {
@@ -2438,7 +2465,7 @@ app.get('/', async function(req, res) {
2438
2465
  resolution = 'best'
2439
2466
  }
2440
2467
 
2441
- body += '<p><span class="tooltip">All<span class="tooltiptext">Will include all entitled live MLB broadcasts (games plus Big Inning, Game Changer, and Multiview, as well as MLB Network, SNLA, and/or SNY as appropriate). If favorite team(s) have been provided, it will also include affiliate games for those organizations. Channels/games subject to blackout will be omitted by default. See below for an additional option to override that.</span></span>: <a href="' + http_root + '/channels.m3u?mediaType=' + mediaType + '&resolution=' + resolution + content_protect_b + '">channels.m3u</a> and <a href="' + http_root + '/guide.xml?mediaType=' + mediaType + content_protect_b + '">guide.xml</a> and <a href="' + http_root + '/calendar.ics?mediaType=' + mediaType + content_protect_b + '">calendar.ics</a></p>' + "\n"
2468
+ body += '<p><span class="tooltip">All<span class="tooltiptext">Will include all entitled live MLB broadcasts (games plus Big Inning, Game Changer, and Multiview, as well as MASN, MLB Network, SNLA, and/or SNY as appropriate). If favorite team(s) have been provided, it will also include affiliate games for those organizations. Channels/games subject to blackout will be omitted by default. See below for an additional option to override that.</span></span>: <a href="' + http_root + '/channels.m3u?mediaType=' + mediaType + '&resolution=' + resolution + content_protect_b + '">channels.m3u</a> and <a href="' + http_root + '/guide.xml?mediaType=' + mediaType + content_protect_b + '">guide.xml</a> and <a href="' + http_root + '/calendar.ics?mediaType=' + mediaType + content_protect_b + '">calendar.ics</a></p>' + "\n"
2442
2469
 
2443
2470
  let include_teams = 'ath,atl'
2444
2471
  if ( (session.credentials.fav_teams.length > 0) && (session.credentials.fav_teams[0].length > 0) ) {
@@ -2457,6 +2484,10 @@ app.get('/', async function(req, res) {
2457
2484
 
2458
2485
  body += '<p><span class="tooltip">Include (or exclude) Winter Leagues<span class="tooltiptext">Winter leagues include the Arizona Fall League, Dominican Winter League aka Liga de Beisbol Dominicano, and Mexican Winter League aka Liga Mexicana del Pacífico. Live stream only, does not support starting from the beginning or certain innings, skip options, etc.</span></span>: <a href="' + http_root + '/channels.m3u?mediaType=' + mediaType + '&resolution=' + resolution + '&includeTeams=winter' + content_protect_b + '">m3u</a> and <a href="' + http_root + '/guide.xml?mediaType=' + mediaType + '&includeTeams=winter' + content_protect_b + '">xml</a> and <a href="' + http_root + '/calendar.ics?mediaType=' + mediaType + '&includeTeams=winter' + content_protect_b + '">ics</a></p>' + "\n"
2459
2486
 
2487
+ if ( entitlements.includes('MASN_110') ) {
2488
+ body += '<p><span class="tooltip">Include (or exclude) MASN<span class="tooltiptext">MASN live stream for entitled subscribers. <a href="https://support.mlb.com/s/article/MASN-In-Market-Offering">See here for more information</a>.</span></span>: <a href="' + http_root + '/channels.m3u?mediaType=' + mediaType + '&resolution=' + resolution + '&includeTeams=masn' + content_protect_b + '">m3u</a> and <a href="' + http_root + '/guide.xml?mediaType=' + mediaType + '&includeTeams=masn' + content_protect_b + '">xml</a></p>' + "\n"
2489
+ }
2490
+
2460
2491
  if ( entitlements.includes('MLBN') || entitlements.includes('EXECMLB') || entitlements.includes('MLBTVMLBNADOBEPASS') ) {
2461
2492
  body += '<p><span class="tooltip">Include (or exclude) MLB Network<span class="tooltiptext">MLB Network live stream is now available in the USA for paid MLBTV subscribers or as a paid add-on, in addition to authenticated TV subscribers. <a href="https://support.mlb.com/s/article/MLB-Network-Streaming-FAQ">See here for more information</a>.</span></span>: <a href="' + http_root + '/channels.m3u?mediaType=' + mediaType + '&resolution=' + resolution + '&includeTeams=mlbn' + content_protect_b + '">m3u</a> and <a href="' + http_root + '/guide.xml?mediaType=' + mediaType + '&includeTeams=mlbn' + content_protect_b + '">xml</a></p>' + "\n"
2462
2493
  }
@@ -2466,7 +2497,7 @@ app.get('/', async function(req, res) {
2466
2497
  }
2467
2498
 
2468
2499
  if ( entitlements.includes('SNY_121') ) {
2469
- body += '<p><span class="tooltip">Include (or exclude) SNY<span class="tooltiptext">SNY live stream for entitled subscribers. <a href="https://support.mlb.com/s/article/SNLA-Plus-Subscription-Packages">See here for more information</a>.</span></span>: <a href="' + http_root + '/channels.m3u?mediaType=' + mediaType + '&resolution=' + resolution + '&includeTeams=sny' + content_protect_b + '">m3u</a> and <a href="' + http_root + '/guide.xml?mediaType=' + mediaType + '&includeTeams=sny' + content_protect_b + '">xml</a></p>' + "\n"
2500
+ body += '<p><span class="tooltip">Include (or exclude) SNY<span class="tooltiptext">SNY live stream for entitled subscribers. <a href="https://support.mlb.com/s/article/SNY-In-Market-Offering">See here for more information</a>.</span></span>: <a href="' + http_root + '/channels.m3u?mediaType=' + mediaType + '&resolution=' + resolution + '&includeTeams=sny' + content_protect_b + '">m3u</a> and <a href="' + http_root + '/guide.xml?mediaType=' + mediaType + '&includeTeams=sny' + content_protect_b + '">xml</a></p>' + "\n"
2470
2501
  }
2471
2502
 
2472
2503
  body += '<p><span class="tooltip">Include (or exclude) Big Inning<span class="tooltiptext">Big Inning is the live look-in and highlights show. <a href="https://www.mlb.com/live-stream-games/big-inning">See here for more information</a>.</span></span>: <a href="' + http_root + '/channels.m3u?mediaType=' + mediaType + '&resolution=' + resolution + '&includeTeams=biginning' + content_protect_b + '">m3u</a> and <a href="' + http_root + '/guide.xml?mediaType=' + mediaType + '&includeTeams=biginning' + content_protect_b + '">xml</a> and <a href="' + http_root + '/calendar.ics?mediaType=' + mediaType + '&includeTeams=biginning' + content_protect_b + '">ics</a></p>' + "\n"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mlbserver",
3
- "version": "2026.2.23",
3
+ "version": "2026.3.15",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
package/session.js CHANGED
@@ -2764,6 +2764,39 @@ class sessionClass {
2764
2764
  channels = this.sortObj(channels)
2765
2765
 
2766
2766
  let entitlements = await this.getEntitlements()
2767
+
2768
+ // MASN live stream for entitled subscribers
2769
+ try {
2770
+ if ( (entitlements.includes('MASN_110')) ) {
2771
+ if ( (mediaType == 'MLBTV') && ((includeLevels.length == 0) || includeLevels.includes('MLB') || includeLevels.includes('ALL')) ) {
2772
+ if ( (excludeTeams.length > 0) && excludeTeams.includes('MASN') ) {
2773
+ // do nothing
2774
+ } else if ( (includeTeams.length == 0) || includeTeams.includes('MASN') ) {
2775
+ this.debuglog('getTVData processing MASN')
2776
+ let logo = 'https://img.mlbstatic.com/mlb-images/image/upload/t_16x9/t_w640/v1745242435/mlb/jov4fxbzmqikc8umj5kr.png'
2777
+ let channelid = mediaType + '.MASN'
2778
+ //if ( this.protection.content_protect ) logo += '&amp;content_protect=' + this.protection.content_protect
2779
+ let stream = server + '/stream.m3u8?event=masn&mediaType=Video&resolution=' + resolution
2780
+ if ( this.protection.content_protect ) stream += '&content_protect=' + this.protection.content_protect
2781
+ if ( pipe == 'true' ) stream = await this.convert_stream_to_pipe(stream, channelid)
2782
+ channels[channelid] = await this.create_channel_object(channelid, logo, stream, mediaType)
2783
+
2784
+ let title = 'MASN'
2785
+ let description = 'Live stream of MASN (Mid-Atlantic Sports Network)'
2786
+
2787
+ let start = this.convertDateToXMLTV(new Date(cache_data.dates[0].date + ' 00:00:00'))
2788
+ let stop = this.convertDateToXMLTV(new Date(cache_data.dates[cache_data.dates.length-1].date + ' 00:00:00'))
2789
+
2790
+ // MASN guide XML
2791
+ programs += await this.generate_xml_program(channelid, start, stop, title, description, logo, this.convertStringToAirDate(cache_data.dates[0].date))
2792
+ this.debuglog('getTVData completed MASN')
2793
+ } // end includeTeams check
2794
+ } // end mediaType check
2795
+ } // end entitlements check
2796
+ } catch (e) {
2797
+ this.debuglog('getTVData MASN detect error : ' + e.message)
2798
+ }
2799
+
2767
2800
  // MLB Network live stream for eligible USA subscribers
2768
2801
  try {
2769
2802
  if ( (entitlements.includes('MLBN') || entitlements.includes('EXECMLB') || entitlements.includes('MLBTVMLBNADOBEPASS')) ) {
@@ -2850,7 +2883,7 @@ class sessionClass {
2850
2883
  let start = this.convertDateToXMLTV(new Date(cache_data.dates[0].date + ' 00:00:00'))
2851
2884
  let stop = this.convertDateToXMLTV(new Date(cache_data.dates[cache_data.dates.length-1].date + ' 00:00:00'))
2852
2885
 
2853
- // SNLA guide XML
2886
+ // SNY guide XML
2854
2887
  programs += await this.generate_xml_program(channelid, start, stop, title, description, logo, this.convertStringToAirDate(cache_data.dates[0].date))
2855
2888
  this.debuglog('getTVData completed SNY')
2856
2889
  } // end includeTeams check
@@ -3848,6 +3881,8 @@ class sessionClass {
3848
3881
  let dateString = eventName.substring(12)
3849
3882
  this.debuglog('getEventStreamURL RecapRundown for ' + dateString)
3850
3883
  playbackURL = await this.getRecapRundownURL(dateString)
3884
+ } else if ( eventName.toUpperCase() == 'MASN' ) {
3885
+ playbackURL = await this.getLinearStreamURL('MASN_ONE_LIVE')
3851
3886
  } else if ( eventName.toUpperCase() == 'MLBN' ) {
3852
3887
  playbackURL = 'https://falcon.mlbinfra.com/api/v1/linear/mlbn'
3853
3888
  } else if ( eventName.toUpperCase() == 'SNLA' ) {