From a02fc782b199b17a6a94f091cc80271289fef262 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 2 Oct 2022 19:51:14 +0200 Subject: mgate: parse operator --- lib/Travel/Status/DE/HAFAS.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Travel') diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm index 2c2b6b5..c313a44 100644 --- a/lib/Travel/Status/DE/HAFAS.pm +++ b/lib/Travel/Status/DE/HAFAS.pm @@ -612,6 +612,11 @@ sub parse_mgate { my $train_type = $product->{prodCtx}{catOutS}; my $line_no = $product->{prodCtx}{line}; + my $operator = $opL[ $product->{oprX} ]; + if ($operator) { + $operator = $operator->{name}; + } + push( @{ $self->{results} }, Travel::Status::DE::HAFAS::Result->new( @@ -622,6 +627,7 @@ sub parse_mgate { delay => $delay, is_cancelled => $is_cancelled, train => $train, + operator => $operator, route_end => $destination, platform => $platform, new_platform => $new_platform, -- cgit v1.2.3