mlbserver 2024.7.24 → 2024.7.25

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/README.md +11 -4
  2. package/package.json +1 -1
  3. package/session.js +10 -8
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # mlbserver
2
-
3
- Current version 2024.07.24
1
+ [![GitHub release](https://img.shields.io/github/release/tonywagner/mlbserver.svg)](https://github.com/tonywagner/mlbserver/releases)
2
+ ![License](https://img.shields.io/badge/license-MIT-blue)
3
+ [![Contributors](https://img.shields.io/github/contributors/tonywagner/mlbserver.svg)](https://github.com/tonywagner/mlbserver/graphs/contributors)
4
4
 
5
- Credit to https://github.com/tonycpsu/streamglob and https://github.com/mafintosh/hls-decryptor
5
+ # mlbserver
6
6
 
7
7
  ## Installation
8
8
 
@@ -135,6 +135,13 @@ h264_vaapi use VAAPI which is another abstraction API to access video accelerati
135
135
  h264_videotoolbox use videotoolbox an API to access hardware on OS X
136
136
  ```
137
137
 
138
+ ## Credits
139
+
140
+ https://github.com/tonycpsu/streamglob
141
+ https://github.com/mafintosh/hls-decryptor
142
+ https://github.com/eracknaphobia/plugin.video.mlbtv
143
+
144
+
138
145
  ## License
139
146
 
140
147
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mlbserver",
3
- "version": "2024.07.24",
3
+ "version": "2024.07.25",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
package/session.js CHANGED
@@ -2579,7 +2579,7 @@ class sessionClass {
2579
2579
  team = 'FREE.' + gameCounter['Free']
2580
2580
  }
2581
2581
 
2582
- let icon = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRi5AKF6eAu9Va9BzZzgw0PSsQXw8rXPiQLHA&s'
2582
+ let icon = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRi5AKF6eAu9Va9BzZzgw0PSsQXw8rXPiQLHA'
2583
2583
  if ( (cache_data.dates[i].games[j].teams['home'].team.id >= 108) && (cache_data.dates[i].games[j].teams['home'].team.id <= 158) && (cache_data.dates[i].games[j].teams['away'].team.id >= 108) && (cache_data.dates[i].games[j].teams['away'].team.id <= 158) ) {
2584
2584
  icon = 'https://img.mlbstatic.com/mlb-photos/image/upload/ar_167:215,c_crop/fl_relative,l_team:' + cache_data.dates[i].games[j].teams['home'].team.id + ':fill:spot.png,w_1.0,h_1,x_0.5,y_0,fl_no_overflow,e_distort:100p:0:200p:0:200p:100p:0:100p/fl_relative,l_team:' + cache_data.dates[i].games[j].teams['away'].team.id + ':logo:spot:current,w_0.38,x_-0.25,y_-0.16/fl_relative,l_team:' + cache_data.dates[i].games[j].teams['home'].team.id + ':logo:spot:current,w_0.38,x_0.25,y_0.16/w_750/team/' + cache_data.dates[i].games[j].teams['away'].team.id + '/fill/spot.png'
2585
2585
  }
@@ -2610,7 +2610,7 @@ class sessionClass {
2610
2610
  if ( (teamType == 'NATIONAL') && ((includeTeams.length == 0) || ((includeTeams.length > 0) && includeTeams.includes(teamType))) ) {
2611
2611
  //logo += '/image.svg?teamId=MLB'
2612
2612
  //if ( this.protection.content_protect ) logo += '&amp;content_protect=' + this.protection.content_protect
2613
- logo = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRi5AKF6eAu9Va9BzZzgw0PSsQXw8rXPiQLHA&s'
2613
+ logo = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRi5AKF6eAu9Va9BzZzgw0PSsQXw8rXPiQLHA'
2614
2614
  nationalChannels[channelid] = await this.create_channel_object(channelid, logo, stream, channelMediaType)
2615
2615
  } else {
2616
2616
  seriesId = cache_data.dates[i].games[j].teams[teamType].team.teamId
@@ -2776,7 +2776,7 @@ class sessionClass {
2776
2776
  let channelid = mediaType + '.GAMECHANGER'
2777
2777
  //let logo = server + '/image.svg?teamId=MLB'
2778
2778
  //if ( this.protection.content_protect ) logo += '&amp;content_protect=' + this.protection.content_protect
2779
- let logo = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRi5AKF6eAu9Va9BzZzgw0PSsQXw8rXPiQLHA&s'
2779
+ let logo = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRi5AKF6eAu9Va9BzZzgw0PSsQXw8rXPiQLHA'
2780
2780
  let stream = server + '/gamechanger.m3u8?resolution=' + resolution
2781
2781
  if ( this.protection.content_protect ) stream += '&content_protect=' + this.protection.content_protect
2782
2782
  if ( pipe == 'true' ) stream = await this.convert_stream_to_pipe(stream, channelid)
@@ -2823,7 +2823,7 @@ class sessionClass {
2823
2823
  let channelid = mediaType + '.MULTIVIEW'
2824
2824
  //let logo = server + '/image.svg?teamId=MLB'
2825
2825
  //if ( this.protection.content_protect ) logo += '&amp;content_protect=' + this.protection.content_protect
2826
- let logo = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRi5AKF6eAu9Va9BzZzgw0PSsQXw8rXPiQLHA&s'
2826
+ let logo = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRi5AKF6eAu9Va9BzZzgw0PSsQXw8rXPiQLHA'
2827
2827
  let stream = server.replace(':' + this.data.port, ':' + this.data.multiviewPort) + this.data.multiviewStreamURLPath
2828
2828
  if ( pipe == 'true' ) stream = await this.convert_stream_to_pipe(stream, channelid)
2829
2829
  channels[channelid] = await this.create_channel_object(channelid, logo, stream, mediaType)
@@ -3737,6 +3737,8 @@ class sessionClass {
3737
3737
  end.setHours(end.getHours()+4)
3738
3738
  }
3739
3739
  }
3740
+ this.debuglog('Game changer start ' + start)
3741
+ this.debuglog('Game changer end ' + end)
3740
3742
  this.temp_cache.gamechanger = {
3741
3743
  date: today,
3742
3744
  start: start,
@@ -4226,7 +4228,7 @@ class sessionClass {
4226
4228
  for (var j = 0; j < games.length; j++) {
4227
4229
  let gamePk = games[j].gamePk.toString()
4228
4230
  if ( games[j].gameDate && !blackouts[gamePk] && !games[j].rescheduleDate && !games[j].status.startTimeTBD && games[j].broadcasts && (await this.count_broadcasts(games[j].broadcasts, 'MLBTV') > 0) ) {
4229
- this.debuglog('get_first_and_last_games first : ' + j)
4231
+ this.debuglog('get_first_and_last_games first : ' + j + ' ' + gamePk + ' at ' + games[j].gameDate)
4230
4232
  firstGameIndex = j
4231
4233
  break
4232
4234
  }
@@ -4235,7 +4237,7 @@ class sessionClass {
4235
4237
  for (var j = (games.length-1); j >= 0; j--) {
4236
4238
  let gamePk = games[j].gamePk.toString()
4237
4239
  if ( games[j].gameDate && !blackouts[gamePk] && !games[j].rescheduleDate && games[j].broadcasts && (await this.count_broadcasts(games[j].broadcasts, 'MLBTV') > 0) ) {
4238
- this.debuglog('get_first_and_last_games last : ' + j)
4240
+ this.debuglog('get_first_and_last_games last : ' + j + ' ' + gamePk + ' at ' + games[j].gameDate)
4239
4241
  lastGameIndex = j
4240
4242
  break
4241
4243
  }
@@ -4354,7 +4356,7 @@ class sessionClass {
4354
4356
  let xml_output = "\n" + ' <programme channel="' + channelid + '" start="' + start + '" stop="' + stop + '">' + "\n" +
4355
4357
  ' <title lang="en">' + title + '</title>' + "\n"
4356
4358
  if ( subtitle ) {
4357
- xml_output += ' <subtitle lang="en">' + subtitle + '</title>' + "\n"
4359
+ xml_output += ' <subtitle lang="en">' + subtitle + '</subtitle>' + "\n"
4358
4360
  }
4359
4361
  xml_output += ' <desc lang="en">' + description.trim() + '</desc>' + "\n" +
4360
4362
  ' <category lang="en">Sports</category>' + "\n" +
@@ -4362,7 +4364,7 @@ class sessionClass {
4362
4364
  ' <category lang="en">Sports event</category>' + "\n" +
4363
4365
  ' <icon src="' + icon + '"></icon>' + "\n"
4364
4366
  if ( teamId ) {
4365
- xml_output += ' <series-id system="team-id">{' + teamId + '</series-id>' + "\n"
4367
+ xml_output += ' <series-id system="team-id">' + teamId + '</series-id>' + "\n"
4366
4368
  }
4367
4369
  xml_output += ' <episode-num system="original-air-date">' + date + '</episode-num>' + "\n"
4368
4370
  if ( gamePk ) {