diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-04-16 18:08:21 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-04-16 18:08:21 +0200 |
commit | 2ff5f92bcc7b4106a675e2bd01da73f8150dae5f (patch) | |
tree | 60099338aad427ea3b7a27df92d6f5ac12244c19 /lib/Travelynx/Model/InTransit.pm | |
parent | 116870a9a5409d62d0ea2708ac06128a7efa54aa (diff) |
Store HAFAS checkins with type/train/line number at checkin station2.6.7
Diffstat (limited to 'lib/Travelynx/Model/InTransit.pm')
-rw-r--r-- | lib/Travelynx/Model/InTransit.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Travelynx/Model/InTransit.pm b/lib/Travelynx/Model/InTransit.pm index 6d3d0e1..0859aed 100644 --- a/lib/Travelynx/Model/InTransit.pm +++ b/lib/Travelynx/Model/InTransit.pm @@ -122,6 +122,8 @@ sub add { } elsif ( $journey and $stop ) { my @route; + my $product = $journey->product_at( $stop->loc->eva ) + // $journey->product; for my $j_stop ( $journey->route ) { push( @route, @@ -153,9 +155,9 @@ sub add { checkin_station_id => $stop->loc->eva, checkin_time => DateTime->now( time_zone => 'Europe/Berlin' ), dep_platform => $stop->{platform}, - train_type => $journey->type // q{}, - train_line => $journey->line_no, - train_no => $journey->number // q{}, + train_type => $product->type // q{}, + train_line => $product->line_no, + train_no => $product->number // q{}, train_id => $journey->id, sched_departure => $stop->{sched_dep}, real_departure => $stop->{rt_dep} // $stop->{sched_dep}, |