diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-07-18 09:11:26 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-07-18 09:11:26 +0200 |
commit | 18e06ad1831b8ea45a87426b75243a7f4ef9f534 (patch) | |
tree | 10635417f3fe2a06474d6f573d4707fde606068c /lib | |
parent | f195abb22603aa1acf332578ef6982fc829e10b6 (diff) |
departure view: use IRIS to decide whether realtime is missing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index b71d6d8..0d5a96a 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -475,6 +475,16 @@ sub render_train { ) ]; + if ( not $result->has_realtime ) { + my $now = DateTime->now( time_zone => 'Europe/Berlin' ); + if ( $result->start < $now ) { + $departure->{missing_realtime} = 1; + } + else { + $departure->{no_realtime_yet} = 1; + } + } + my $linetype = 'bahn'; my @classes = $result->classes; if ( @classes == 0 ) { @@ -680,7 +690,8 @@ sub render_train { } if ($route_ts) { if ( $route_ts->{ $result->station }{rt_bogus} ) { - $departure->{missing_realtime} = 1; + + #$departure->{missing_realtime} = 1; } for my $elem ( @{ $departure->{route_pre_diff} }, |