From 18e06ad1831b8ea45a87426b75243a7f4ef9f534 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 18 Jul 2021 09:11:26 +0200 Subject: departure view: use IRIS to decide whether realtime is missing --- lib/DBInfoscreen/Controller/Stationboard.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lib') 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} }, -- cgit v1.2.3