summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-07-18 09:11:26 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-07-18 09:11:26 +0200
commit18e06ad1831b8ea45a87426b75243a7f4ef9f534 (patch)
tree10635417f3fe2a06474d6f573d4707fde606068c /lib
parentf195abb22603aa1acf332578ef6982fc829e10b6 (diff)
departure view: use IRIS to decide whether realtime is missing
Diffstat (limited to 'lib')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm13
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} },