connections: order by realtime, not scheduled departure
This commit is contained in:
parent
2d250d02bc
commit
962aac63af
1 changed files with 5 additions and 1 deletions
|
@ -1934,6 +1934,10 @@ sub startup {
|
|||
if ( $stationboard->{errstr} ) {
|
||||
return;
|
||||
}
|
||||
@{ $stationboard->{results} } = map { $_->[0] }
|
||||
sort { $a->[1] <=> $b->[1] }
|
||||
map { [ $_, $_->departure ? $_->departure->epoch : 0 ] }
|
||||
@{ $stationboard->{results} };
|
||||
my @results;
|
||||
my %via_count = map { $_ => 0 } @destinations;
|
||||
for my $train ( @{ $stationboard->{results} } ) {
|
||||
|
@ -1967,7 +1971,7 @@ sub startup {
|
|||
map {
|
||||
[
|
||||
$_,
|
||||
$_->[0]->departure->epoch // $_->[0]->sched_departur->epoch
|
||||
$_->[0]->departure->epoch // $_->[0]->sched_departure->epoch
|
||||
]
|
||||
} @results;
|
||||
|
||||
|
|
Loading…
Reference in a new issue