mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 14:05:13 +00:00
line score OT fix
This commit is contained in:
@@ -62,13 +62,13 @@ func importPlayerTotalsPlayoffsScrape(db *gorm.DB) {
|
||||
func importGameSchedules(db *gorm.DB) {
|
||||
// An NBA season typically runs from October to June
|
||||
months := []string{
|
||||
"october", "november", "december", "january",
|
||||
"septempber", "october", "november", "december", "january",
|
||||
"february", "march", "april", "may", "june",
|
||||
|
||||
// "february", "march", "april", "may", "june",
|
||||
}
|
||||
|
||||
for season := 2003; season <= 2008; season++ {
|
||||
for season := 2024; season <= 2026; season++ {
|
||||
log.Printf("--- Starting Game Schedule Import for Season: %d ---", season)
|
||||
for _, month := range months {
|
||||
// The service will print a warning and skip if a month has no data (e.g. May/June for a season not yet finished)
|
||||
@@ -88,8 +88,8 @@ func importGameSchedules(db *gorm.DB) {
|
||||
// importBoxScores fetches and stores all box score data (line scores, player/team stats)
|
||||
// for games within a recent date range.
|
||||
func importBoxScores(db *gorm.DB) {
|
||||
from := time.Date(2025, time.February, 1, 0, 0, 0, 0, time.UTC)
|
||||
to := time.Date(2025, time.February, 14, 0, 0, 0, 0, time.UTC)
|
||||
from := time.Date(2025, time.October, 1, 0, 0, 0, 0, time.UTC)
|
||||
to := time.Date(2026, time.January, 1, 0, 0, 0, 0, time.UTC)
|
||||
|
||||
dateRangeComment := fmt.Sprintf("--- Starting Box Score Data Import for games between %s and %s ---",
|
||||
from.Format("January 2, 2006"),
|
||||
@@ -129,14 +129,22 @@ func importPlayerShotCharts(db *gorm.DB) {
|
||||
// "hardeja01",
|
||||
// "irvinky01",
|
||||
// "duranke01",
|
||||
// "youngtr01",
|
||||
// "lillada01",
|
||||
// "gilgesh01",
|
||||
// "brunsja01",
|
||||
// "edwaran01",
|
||||
// "mitchdo01",
|
||||
// "bookede01",
|
||||
// "derozde01",
|
||||
// "aldrila01",
|
||||
// "westbru01",
|
||||
// "paulch01",
|
||||
// "butleji01",
|
||||
"davisan02",
|
||||
"leonaka01",
|
||||
"youngtr01",
|
||||
"lillada01",
|
||||
"gilgesh01",
|
||||
"brunsja01",
|
||||
"edwaran01",
|
||||
"mitchdo01",
|
||||
"bookede01",
|
||||
"derozde01",
|
||||
"tatumja01",
|
||||
|
||||
// Add more player IDs here as needed
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user