Journeys: Handle "Betriebsstelle nicht bekannt"

This commit is contained in:
Daniel Friesel 2022-12-12 19:57:14 +01:00
parent fc9562f790
commit e91495775c
No known key found for this signature in database
GPG key ID: 100D5BFB5166E005

View file

@ -547,6 +547,11 @@ sub get {
if ( $opt{verbose} ) { if ( $opt{verbose} ) {
my $rename = $self->{renamed_station}; my $rename = $self->{renamed_station};
for my $stop ( @{ $ref->{route} } ) { for my $stop ( @{ $ref->{route} } ) {
if ( $stop->[0] =~ m{^Betriebsstelle nicht bekannt (\d+)$} ) {
if ( my $s = $self->{stations}->get_by_eva($1) ) {
$stop->[0] = $s->{name};
}
}
if ( $rename->{ $stop->[0] } ) { if ( $rename->{ $stop->[0] } ) {
$stop->[0] = $rename->{ $stop->[0] }; $stop->[0] = $rename->{ $stop->[0] };
} }