diff options
Diffstat (limited to 'lib/Travel')
-rw-r--r-- | lib/Travel/Status/DE/HAFAS/Journey.pm | 7 |
1 files changed, 5 insertions, 2 deletions
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 ); |