summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Helper/HAFAS.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-12-27 10:59:35 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2023-12-27 10:59:35 +0100
commitd47195a0cf30a64ca7afcbbeed6edb6b54039104 (patch)
tree3a993c3c303958fd5b5e08058c01cb995ff91477 /lib/Travelynx/Helper/HAFAS.pm
parentc24edf3027ab4513e99e3aba876fc19199c35b12 (diff)
Switch to Travel::Status::DE::HAFAS 5.x
Diffstat (limited to 'lib/Travelynx/Helper/HAFAS.pm')
-rw-r--r--lib/Travelynx/Helper/HAFAS.pm30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/Travelynx/Helper/HAFAS.pm b/lib/Travelynx/Helper/HAFAS.pm
index 6a759b0..d7f2a10 100644
--- a/lib/Travelynx/Helper/HAFAS.pm
+++ b/lib/Travelynx/Helper/HAFAS.pm
@@ -171,20 +171,20 @@ sub get_route_timestamps_p {
my $station_is_past = 1;
for my $stop ( $journey->route ) {
- my $name = $stop->{name};
- $ret->{$name} = $ret->{ $stop->{eva} } = {
- name => $stop->{name},
- eva => $stop->{eva},
- sched_arr => _epoch( $stop->{sched_arr} ),
- sched_dep => _epoch( $stop->{sched_dep} ),
- rt_arr => _epoch( $stop->{rt_arr} ),
- rt_dep => _epoch( $stop->{rt_dep} ),
- arr_delay => $stop->{arr_delay},
- dep_delay => $stop->{dep_delay},
- load => $stop->{load}
+ my $name = $stop->loc->name;
+ $ret->{$name} = $ret->{ $stop->loc->eva } = {
+ name => $stop->loc->name,
+ eva => $stop->loc->eva,
+ sched_arr => _epoch( $stop->sched_arr ),
+ sched_dep => _epoch( $stop->sched_dep ),
+ rt_arr => _epoch( $stop->rt_arr ),
+ rt_dep => _epoch( $stop->rt_dep ),
+ arr_delay => $stop->arr_delay,
+ dep_delay => $stop->dep_delay,
+ load => $stop->load
};
- if ( ( $stop->{arr_cancelled} or not $stop->{sched_arr} )
- and ( $stop->{dep_cancelled} or not $stop->{sched_dep} ) )
+ if ( ( $stop->arr_cancelled or not $stop->sched_arr )
+ and ( $stop->dep_cancelled or not $stop->sched_dep ) )
{
$ret->{$name}{isCancelled} = 1;
}
@@ -229,8 +229,8 @@ sub get_route_timestamps_p {
or index( $hafas_stations, $iris_stations ) != -1 )
{
$polyline = {
- from_eva => ( $journey->route )[0]{eva},
- to_eva => ( $journey->route )[-1]{eva},
+ from_eva => ( $journey->route )[0]->loc->eva,
+ to_eva => ( $journey->route )[-1]->loc->eva,
coords => \@coordinate_list,
};
}