diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-04-03 18:50:36 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-04-03 18:50:36 +0200 |
commit | 7e92994838ae4c4548c2569f303340756793a0f4 (patch) | |
tree | f7ae90bd144a5ee06da386d97b0468e1062a991c /bin | |
parent | 99ea553eadf3dbfea7c5f0948115012617195b26 (diff) |
Journey: Add operators accessor
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/hafas-m | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/bin/hafas-m b/bin/hafas-m index 4676c49..c32f747 100755 --- a/bin/hafas-m +++ b/bin/hafas-m @@ -439,18 +439,10 @@ elsif ( $opt{journey} ) { $delay_fmt = $delay_len + 3; } - if ( @prods == 1 ) { - if ( $prev_prod->operator ) { - printf( "Betrieb: %s\n", $prev_prod->operator ); - } - } - else { - printf( - "Betrieb: %s\n", - join( q{, }, - uniq map { $_->operator } grep { $_->operator } @prods ) - ); + if ( $result->operators ) { + printf( "Betrieb: %s\n", join( q{, }, $result->operators ) ); } + $prev_prod = 0; my $desc = Travel::Status::DE::HAFAS::get_service($service) // {}; |