Browse Source

Cleaned up for screenshots

master
Noah Pederson 6 years ago
parent
commit
7f15ec430b
  1. 2
      database/database.go
  2. 6
      gotvtracker.go
  3. 3
      run/run.go

2
database/database.go

@ -84,7 +84,7 @@ func GetEpisodesByDate(d *time.Time) ([]Episode, error) {
return nil, err
}
defer rows.Close()
data := make([]Episode, 0) //If more than 10 rows are returned, this will crash.
data := make([]Episode, 0)
//Loop through the returned rows
for rows.Next() {

6
gotvtracker.go

@ -8,12 +8,8 @@ import (
)
func main() {
database.Init() //Initialize the database, woot woot
database.Init() //Initialize the database
args := os.Args[1:]
fmt.Println("Running gotvtracker...")
run.Run(args)
}

3
run/run.go

@ -88,9 +88,6 @@ func check() {
log.Fatal("Unable to parse episode air time")
continue
}
//fmt.Println("Airtime of ", airtime.Format("2006-01-02 3:04 pm"), " is after",
//hourAgo.Format("2006-01-02 3:04 pm"), airtime.After(hourAgo),
//"and before ", inHour.Format("2006-01-02 3:04 pm"), airtime.Before(inHour))
if airtime.After(hourAgo) && airtime.Before(inHour) {
fmt.Println("Notifying of episode airing within one hour before or after now")
database.SetEpisodeChecked(e.EpisodeId)

Loading…
Cancel
Save