lib/sportdb/reader.rb in sportdb-1.6.4 vs lib/sportdb/reader.rb in sportdb-1.6.5
- old
+ new
@@ -527,13 +527,22 @@
match_teams!( line )
team1_key = find_team1!( line )
team2_key = find_team2!( line )
- date = find_date!( line )
+ if is_postponed?( line )
+ postponed = true
+ date_v2 = find_date!( line )
+ date = find_date!( line )
+ else
+ postponed = false
+ date_v2 = nil
+ date = find_date!( line )
+ end
+
scores = find_scores!( line )
-
+
logger.debug " line: >#{line}<"
### todo: cache team lookups in hash?
@@ -551,10 +560,12 @@
score2: scores[1],
score1ot: scores[2],
score2ot: scores[3],
score1p: scores[4],
score2p: scores[5],
- play_at: date,
+ play_at: date,
+ play_at_v2: date_v2,
+ postponed: postponed,
knockout: @knockout_flag,
group_id: @group.present? ? @group.id : nil
}
game_attribs[ :pos ] = pos if pos.present?