diff options
author | Daniel Friesel <derf@finalrewind.org> | 2023-02-12 18:35:29 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2023-02-12 18:35:29 +0100 |
commit | 3ac61f8a4e5d40c66dd1a29f6ab768ad87c79940 (patch) | |
tree | 8f957c31f3bcf85a262855320a568b369067282d /lib/Travel/Status | |
parent | c2817912d261c625d74d5142e562af67972ce078 (diff) |
Fix route_end handling for arrivals mode
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r-- | lib/Travel/Status/DE/HAFAS/Journey.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm index dbe708e..7be8410 100644 --- a/lib/Travel/Status/DE/HAFAS/Journey.pm +++ b/lib/Travel/Status/DE/HAFAS/Journey.pm @@ -166,7 +166,13 @@ sub new { } if ( $journey->{stbStop} ) { - shift(@stops); + if ( $hafas->{arrivals} ) { + $route_end = $stops[0]->{name}; + pop(@stops); + } + else { + shift(@stops); + } } my $ref = { |