From 968a83de9682edd20480526d51ea82343f6588db Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 17 Oct 2022 09:51:58 +0200 Subject: journey: destination => direction --- lib/Travel/Status/DE/HAFAS/Journey.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/Travel/Status') diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm index 0e3d52f..8a541b3 100644 --- a/lib/Travel/Status/DE/HAFAS/Journey.pm +++ b/lib/Travel/Status/DE/HAFAS/Journey.pm @@ -30,7 +30,7 @@ sub new { my $date = $journey->{date}; - my $destination = $journey->{dirTxt}; + my $direction = $journey->{dirTxt}; my $is_cancelled = $journey->{isCncl}; my $jid = $journey->{jid}; @@ -126,7 +126,7 @@ sub new { is_cancelled => $is_cancelled, train => $train, operator => $operator, - destination => $destination, + direction => $direction, route_end => $stops[-1]{name}, messages => \@messages, route => \@stops, @@ -140,6 +140,9 @@ sub new { $ref->{destination} = $ref->{route_end}; } } + else { + $ref->{route_start} = $stops[0]{name}; + } bless( $ref, $obj ); -- cgit v1.2.3