@@ -77,7 +77,7 @@ def schedule(
77
77
params .update (
78
78
{
79
79
"sportId" : str (sportId ),
80
- "hydrate" : "decisions,probablePitcher(note),linescore" ,
80
+ "hydrate" : "decisions,probablePitcher(note),linescore,broadcasts,game(content(media(epg))) " ,
81
81
}
82
82
)
83
83
@@ -121,7 +121,16 @@ def schedule(
121
121
"inning_state" : game .get ("linescore" , {}).get ("inningState" , "" ),
122
122
"venue_id" : game .get ("venue" , {}).get ("id" ),
123
123
"venue_name" : game .get ("venue" , {}).get ("name" ),
124
+ "national_broadcasts" : list (
125
+ set (
126
+ broadcast ["name" ]
127
+ for broadcast in game .get ("broadcasts" , [])
128
+ if broadcast .get ("isNational" , False )
129
+ )
130
+ ),
124
131
}
132
+ if game ["content" ].get ("media" , {}).get ("freeGame" , False ):
133
+ game_info ["national_broadcasts" ].append ("MLB.tv Free Game" )
125
134
if game_info ["status" ] in ["Final" , "Game Over" ]:
126
135
if game .get ("isTie" ):
127
136
game_info .update ({"winning_team" : "Tie" , "losing_Team" : "Tie" })
@@ -1339,20 +1348,8 @@ def standings(
1339
1348
for div in divisions .values ():
1340
1349
standings += div ["div_name" ] + "\n "
1341
1350
if include_wildcard :
1342
- standings += (
1343
- "{:^4} {:<21} {:^3} {:^3} {:^4} {:^4} {:^7} {:^5} {:^4}\n " .format (
1344
- * [
1345
- "Rank" ,
1346
- "Team" ,
1347
- "W" ,
1348
- "L" ,
1349
- "GB" ,
1350
- "(E#)" ,
1351
- "WC Rank" ,
1352
- "WC GB" ,
1353
- "(E#)" ,
1354
- ]
1355
- )
1351
+ standings += "{:^4} {:<21} {:^3} {:^3} {:^4} {:^4} {:^7} {:^5} {:^4}\n " .format (
1352
+ * ["Rank" , "Team" , "W" , "L" , "GB" , "(E#)" , "WC Rank" , "WC GB" , "(E#)" ,]
1356
1353
)
1357
1354
for t in div ["teams" ]:
1358
1355
standings += "{div_rank:^4} {name:<21} {w:^3} {l:^3} {gb:^4} {elim_num:^4} {wc_rank:^7} {wc_gb:^5} {wc_elim_num:^4}\n " .format (
0 commit comments