summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-10-02 19:51:14 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-10-02 19:51:14 +0200
commita02fc782b199b17a6a94f091cc80271289fef262 (patch)
tree07843c3cd0bdd050e884489db70bd2627549d65a /lib
parentf3beaf2d9eb789a6f745d4606d2e95bbb5ad29ae (diff)
mgate: parse operator
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/HAFAS.pm6
1 files changed, 6 insertions, 0 deletions
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,