diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-12-27 11:16:38 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-12-27 11:16:38 +0100 |
commit | 4d044fb98a16a7c26e88ce138e4c3f8e973bb30f (patch) | |
tree | 298ee82eed901bfb5ba66bb17c2ca60d5019d76f /lib | |
parent | 65f35488428c82ec2b7fb8b9ccfce8d09380c216 (diff) |
Fix connection display for Travel::Status::DE::HAFAS 5.x2.5.6
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 18 |
1 files 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 ); } |