diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-11-19 12:59:18 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-11-19 12:59:18 +0100 |
commit | 2b2fcbdee810b59ecfec85929f134c07f5aa40c8 (patch) | |
tree | 343bc91ac07641f9cf64b1aec9b5d3dcb7026b04 /bin | |
parent | 1c82ee17d2fa06a79fe3b96883d603408b4fe74a (diff) |
Use Travel::Status::DE::HAFAS::Journey for journey data
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/hafas | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -295,16 +295,16 @@ for my $res ( $hafas->connections ) { $glance .= sprintf( ' (%01d:%02d) %s', $sec->transfer_duration->in_units( 'hours', 'minutes' ), - $sec->name + $sec->journey->name ); } else { $negative_transfer = 1; - $glance .= sprintf( ' (--:--) %s', $sec->name ); + $glance .= sprintf( ' (--:--) %s', $sec->journey->name ); } } else { - $glance .= $sec->name; + $glance .= $sec->journey->name; } } @@ -348,9 +348,12 @@ for my $res ( $hafas->connections ) { for my $sec ( $res->sections ) { if ( $sec->type eq 'JNY' ) { - printf( "${output_bold}%s${output_reset} → %s %s\n", - $sec->name, $sec->direction, - display_occupancies( $sec->load ) ); + printf( + "${output_bold}%s${output_reset} → %s %s\n", + $sec->journey->name, + $sec->journey->direction, + display_occupancies( $sec->load ) + ); printf( "%-5s %-${delay_fmt}s ab %s%s%s\n", $sec->dep_cancelled |