diff options
| author | Daniel Friesel <derf@finalrewind.org> | 2019-06-07 20:34:28 +0200 | 
|---|---|---|
| committer | Daniel Friesel <derf@finalrewind.org> | 2019-06-07 20:34:28 +0200 | 
| commit | 962aac63af84ff845120af0146d01879c1abbde8 (patch) | |
| tree | 2f5b306ca5725362a66b5f769bb81371e81d38e3 | |
| parent | 2d250d02bc47d783ae4629267f5804e2d88da387 (diff) | |
connections: order by realtime, not scheduled departure1.7.3
| -rwxr-xr-x | lib/Travelynx.pm | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 7a4b6ca..4f6e839 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -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; | 
