diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-12-27 10:59:35 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-12-27 10:59:35 +0100 |
commit | d47195a0cf30a64ca7afcbbeed6edb6b54039104 (patch) | |
tree | 3a993c3c303958fd5b5e08058c01cb995ff91477 /lib/Travelynx/Model/InTransit.pm | |
parent | c24edf3027ab4513e99e3aba876fc19199c35b12 (diff) |
Switch to Travel::Status::DE::HAFAS 5.x
Diffstat (limited to 'lib/Travelynx/Model/InTransit.pm')
-rw-r--r-- | lib/Travelynx/Model/InTransit.pm | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/Travelynx/Model/InTransit.pm b/lib/Travelynx/Model/InTransit.pm index adcdfa3..fa9c464 100644 --- a/lib/Travelynx/Model/InTransit.pm +++ b/lib/Travelynx/Model/InTransit.pm @@ -126,16 +126,16 @@ sub add { push( @route, [ - $j_stop->name, - $j_stop->eva, + $j_stop->loc->name, + $j_stop->loc->eva, { - sched_arr => _epoch( $j_stop->{sched_arr} ), - sched_dep => _epoch( $j_stop->{sched_dep} ), - rt_arr => _epoch( $j_stop->{rt_arr} ), - rt_dep => _epoch( $j_stop->{rt_dep} ), - arr_delay => $j_stop->{arr_delay}, - dep_delay => $j_stop->{dep_delay}, - load => $j_stop->{load} + sched_arr => _epoch( $j_stop->sched_arr ), + sched_dep => _epoch( $j_stop->sched_dep ), + rt_arr => _epoch( $j_stop->rt_arr ), + rt_dep => _epoch( $j_stop->rt_dep ), + arr_delay => $j_stop->arr_delay, + dep_delay => $j_stop->dep_delay, + load => $j_stop->load } ] ); @@ -147,7 +147,7 @@ sub add { cancelled => $stop->{dep_cancelled} ? 1 : 0, - checkin_station_id => $stop->eva, + checkin_station_id => $stop->loc->eva, checkin_time => DateTime->now( time_zone => 'Europe/Berlin' ), dep_platform => $stop->{platform}, train_type => $journey->type // q{}, @@ -724,16 +724,16 @@ sub update_arrival_hafas { push( @route, [ - $j_stop->name, - $j_stop->eva, + $j_stop->loc->name, + $j_stop->loc->eva, { - sched_arr => _epoch( $j_stop->{sched_arr} ), - sched_dep => _epoch( $j_stop->{sched_dep} ), - rt_arr => _epoch( $j_stop->{rt_arr} ), - rt_dep => _epoch( $j_stop->{rt_dep} ), - arr_delay => $j_stop->{arr_delay}, - dep_delay => $j_stop->{dep_delay}, - load => $j_stop->{load} + sched_arr => _epoch( $j_stop->sched_arr ), + sched_dep => _epoch( $j_stop->sched_dep ), + rt_arr => _epoch( $j_stop->rt_arr ), + rt_dep => _epoch( $j_stop->rt_dep ), + arr_delay => $j_stop->arr_delay, + dep_delay => $j_stop->dep_delay, + load => $j_stop->load } ] ); |