summaryrefslogtreecommitdiff
path: root/cgi/index.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-12-12 15:01:52 +0100
committerDaniel Friesel <derf@finalrewind.org>2013-12-12 15:01:52 +0100
commit4affeeffb8f9b84f905475982ab93ba785ee7016 (patch)
tree6c0097444fd2f0bf7831478b14b10a1df0b206c9 /cgi/index.pl
parent07a5d91dc3ba22b80ebb583cb690b54dc6505f8b (diff)
add oeffi-like "clean" display. Still quite experimental
(copied from https://wiki.die-foobar.de/wiki/Infoscreen sources)
Diffstat (limited to 'cgi/index.pl')
-rw-r--r--cgi/index.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/cgi/index.pl b/cgi/index.pl
index f50fec7..6d635c2 100644
--- a/cgi/index.pl
+++ b/cgi/index.pl
@@ -83,6 +83,7 @@ sub handle_request {
for my $result (@results) {
my $platform = ( split( / /, $result->platform ) )[0];
+ my $delay = 0;
if ($via) {
my @route = $result->route;
if ( not( any { $_ =~ m{$via}io } @route ) ) {
@@ -97,6 +98,9 @@ sub handle_request {
if ( $info eq '+0' ) {
$info = undef;
}
+ if ( $info and $info =~ m{ \+ (\d+) }x ) {
+ $delay = $1;
+ }
if ( $hide_low_delay and $info ) {
$info =~ s{ (?: ca\. \s* )? \+ [ 1 2 3 4 ] $ }{}x;
}
@@ -112,6 +116,7 @@ sub handle_request {
destination => $result->destination,
platform => $platform,
info => $info,
+ delay => $delay,
}
);
}