diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-10-15 18:41:57 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-10-15 18:41:57 +0200 |
commit | 4412dc8cf30d7ac812178d91ce5674c9c773902e (patch) | |
tree | 17b36debc5655e86a11222d95fb4c9858e3ffef2 /lib/DBInfoscreen/Controller/Stationboard.pm | |
parent | 7a11b1366d4748b8708d52f09ec3d3dfb650168a (diff) |
prepare more detailed traininfo view when offline / on slow network
Diffstat (limited to 'lib/DBInfoscreen/Controller/Stationboard.pm')
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index d7c0bd7..95aa08c 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -853,8 +853,8 @@ sub handle_request { @departures, [ sprintf( '%5s %s%s', - $result->is_cancelled ? '--:--' : $time, - ( $delay and $delay > 0 ) ? q{+} : q{}, + $result->is_cancelled ? '--:--' : $time, + ( $delay and $delay > 0 ) ? q{+} : q{}, $delay || q{} ), $result->train, $result->destination, @@ -904,6 +904,8 @@ sub handle_request { }, moreinfo => $moreinfo, delay => $delay, + route_pre => [ $result->route_pre ], + route_post => [ $result->route_post ], additional_stops => [ $result->additional_stops ], canceled_stops => [ $result->canceled_stops ], replaced_by => [ @@ -920,14 +922,12 @@ sub handle_request { } ); if ( $self->param('train') ) { - $departures[-1]{route_pre} = [ $result->route_pre ]; $departures[-1]{route_pre_diff} = [ $self->json_route_diff( [ $result->route_pre ], [ $result->sched_route_pre ] ) ]; - $departures[-1]{route_post} = [ $result->route_post ]; $departures[-1]{route_post_diff} = [ $self->json_route_diff( [ $result->route_post ], |