summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Helper/IRIS.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-02-25 06:50:03 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-02-25 06:50:03 +0100
commitab14df0b16c47a8ece612a56d7b2cab6a82dc704 (patch)
tree5a427957119cda3e7d56928b24de7b31b72857c7 /lib/Travelynx/Helper/IRIS.pm
parentdafeb838dc245176444acc7c0338290dbbf0307b (diff)
Berlin Hbf is cursed.2.5.19
Diffstat (limited to 'lib/Travelynx/Helper/IRIS.pm')
-rw-r--r--lib/Travelynx/Helper/IRIS.pm20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Travelynx/Helper/IRIS.pm b/lib/Travelynx/Helper/IRIS.pm
index 2014003..deed79a 100644
--- a/lib/Travelynx/Helper/IRIS.pm
+++ b/lib/Travelynx/Helper/IRIS.pm
@@ -28,6 +28,16 @@ sub get_departures {
my $lookahead = $opt{lookahead} // 30;
my $with_related = $opt{with_related} // 0;
+ # Berlin Hbf exists twice:
+ # - BLS / 8011160
+ # - BL / 8098160 (formerly "Berlin Hbf (tief)")
+ # Right now, travelynx assumes that station name -> EVA / DS100 is a unique
+ # map. This is not the case. Work around it here until travelynx has been
+ # adjusted properly.
+ if ( $station eq 'Berlin Hbf' or $station eq '8011160' ) {
+ $with_related = 1;
+ }
+
my @station_matches
= Travel::Status::DE::IRIS::Stations::get_station($station);
@@ -85,6 +95,16 @@ sub get_departures_p {
my $lookahead = $opt{lookahead} // 30;
my $with_related = $opt{with_related} // 0;
+ # Berlin Hbf exists twice:
+ # - BLS / 8011160
+ # - BL / 8098160 (formerly "Berlin Hbf (tief)")
+ # Right now, travelynx assumes that station name -> EVA / DS100 is a unique
+ # map. This is not the case. Work around it here until travelynx has been
+ # adjusted properly.
+ if ( $station eq 'Berlin Hbf' or $station eq '8011160' ) {
+ $with_related = 1;
+ }
+
my @station_matches
= Travel::Status::DE::IRIS::Stations::get_station($station);