From 4d044fb98a16a7c26e88ce138e4c3f8e973bb30f Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 27 Dec 2023 11:16:38 +0100 Subject: Fix connection display for Travel::Status::DE::HAFAS 5.x --- lib/Travelynx/Controller/Traveling.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 08e7fa4..7ff646d 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -307,14 +307,14 @@ sub get_connecting_trains_p { $iris_train->[3] = $hafas_train->load; } for my $stop ( $hafas_train->route ) { - if ( $stop->{name} - and $stop->{name} eq + if ( $stop->loc->name + and $stop->loc->name eq $iris_train->[1]->{name} - and $stop->{arr} ) + and $stop->arr ) { - $iris_train->[2] = $stop->{arr}; + $iris_train->[2] = $stop->arr; if ( $iris_train->[0]->departure_delay - and not $stop->{arr_delay} ) + and not $stop->arr_delay ) { $iris_train->[2] ->add( minutes => $iris_train->[0] @@ -338,16 +338,16 @@ sub get_connecting_trains_p { } for my $stop ( $hafas_train->route ) { for my $dest (@destinations) { - if ( $stop->{name} - and $stop->{name} eq $dest->{name} + if ( $stop->loc->name + and $stop->loc->name eq $dest->{name} and $via_count{ $dest->{name} } < 2 and $hafas_train->datetime ) { my $departure = $hafas_train->datetime; - my $arrival = $stop->{arr}; + my $arrival = $stop->arr; my $delay = $hafas_train->delay; if ( $delay - and $stop->{arr} == $stop->{sched_arr} ) + and $stop->arr == $stop->sched_arr ) { $arrival->add( minutes => $delay ); } -- cgit v1.2.3