Improve "Betriebsstelle nicht bekannt" handling
This commit is contained in:
parent
5de6dfb4e1
commit
fc9562f790
2 changed files with 11 additions and 1 deletions
|
@ -1034,6 +1034,14 @@ sub startup {
|
||||||
my ( $route_data, $journey, $polyline ) = @_;
|
my ( $route_data, $journey, $polyline ) = @_;
|
||||||
|
|
||||||
for my $station ( @{$route} ) {
|
for my $station ( @{$route} ) {
|
||||||
|
if ( $station->[0]
|
||||||
|
=~ m{^Betriebsstelle nicht bekannt (\d+)$} )
|
||||||
|
{
|
||||||
|
my $eva = $1;
|
||||||
|
if ( $route_data->{$eva} ) {
|
||||||
|
$station->[0] = $route_data->{$eva}{name};
|
||||||
|
}
|
||||||
|
}
|
||||||
$station->[1]
|
$station->[1]
|
||||||
= $route_data->{ $station->[0] };
|
= $route_data->{ $station->[0] };
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,9 @@ sub get_route_timestamps_p {
|
||||||
my $station_is_past = 1;
|
my $station_is_past = 1;
|
||||||
for my $stop ( $journey->route ) {
|
for my $stop ( $journey->route ) {
|
||||||
my $name = $stop->{name};
|
my $name = $stop->{name};
|
||||||
$ret->{$name} = {
|
$ret->{$name} = $ret->{ $stop->{eva} } = {
|
||||||
|
name => $stop->{name},
|
||||||
|
eva => $stop->{eva},
|
||||||
sched_arr => _epoch( $stop->{sched_arr} ),
|
sched_arr => _epoch( $stop->{sched_arr} ),
|
||||||
sched_dep => _epoch( $stop->{sched_dep} ),
|
sched_dep => _epoch( $stop->{sched_dep} ),
|
||||||
rt_arr => _epoch( $stop->{rt_arr} ),
|
rt_arr => _epoch( $stop->{rt_arr} ),
|
||||||
|
|
Loading…
Reference in a new issue