From de074342de0bdc3604a0610a0c5f9cce5338bb85 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 24 Sep 2023 18:19:17 +0200 Subject: add support for HAFAS connection suggestions; drop manual destination list Still TODO: handle stations that have several EVAs --- lib/Travelynx/Model/Journeys.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/Travelynx/Model/Journeys.pm') diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index 1c975f4..3fa2d96 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -1726,7 +1726,7 @@ sub get_connection_targets { my $min_count = $opt{min_count} // 3; if ( $opt{destination_name} ) { - return ( $opt{destination_name} ); + return ( { eva => $opt{eva}, name => $opt{destination_name} } ); } my $dest_id = $opt{eva} // $self->get_latest_dest_id(%opt); @@ -1755,7 +1755,6 @@ sub get_connection_targets { = $res->hashes->grep( sub { shift->{count} >= $min_count } ) ->map( sub { shift->{dest} } )->each; @destinations = $self->{stations}->get_by_evas(@destinations); - @destinations = map { $_->{name} } @destinations; return @destinations; } -- cgit v1.2.3