summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Helper/HAFAS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Helper/HAFAS.pm')
-rw-r--r--lib/Travelynx/Helper/HAFAS.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Travelynx/Helper/HAFAS.pm b/lib/Travelynx/Helper/HAFAS.pm
index 78e1c8f..6d2f6d2 100644
--- a/lib/Travelynx/Helper/HAFAS.pm
+++ b/lib/Travelynx/Helper/HAFAS.pm
@@ -169,8 +169,13 @@ sub get_route_timestamps_p {
[ $coord->{lon}, $coord->{lat} ] );
}
}
- my $iris_stations = join( '|', $opt{train}->route );
- my $hafas_stations = join( '|', @station_list );
+ my $iris_stations = join( '|', $opt{train}->route );
+
+ # borders (Gr" as in "Grenze") are only returned by HAFAS.
+ # They are not stations.
+ my $hafas_stations
+ = join( '|', grep { $_ !~ m{(\(Gr\)|\)Gr)$} } @station_list );
+
if ( $iris_stations eq $hafas_stations
or index( $hafas_stations, $iris_stations ) != -1 )
{