diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-06-27 19:26:33 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-06-27 19:26:33 +0200 |
commit | efa20faf8c5392c10ecb5af23dac9fa541054a27 (patch) | |
tree | 01b88937fbedea0135d56ab3445afa20c7156cf1 /cgi/index.pl | |
parent | 615db7d1d46514f5e1f55fb6f91c58f9a99f4b00 (diff) |
fix route filter for iris backend (use ruote_post)
Diffstat (limited to 'cgi/index.pl')
-rw-r--r-- | cgi/index.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cgi/index.pl b/cgi/index.pl index c5180e5..1613438 100644 --- a/cgi/index.pl +++ b/cgi/index.pl @@ -119,6 +119,9 @@ sub handle_request { my $delay = 0; if ($via) { my @route = $result->route; + if ( $result->isa('Travel::Status::DE::IRIS::Result') ) { + @route = $result->route_post; + } if ( not( any { $_ =~ m{$via}io } @route ) ) { next; } @@ -138,13 +141,13 @@ sub handle_request { $info = "Fahrt fällt aus: ${delaymsg}"; } elsif ( $result->delay and $result->delay > 0 ) { - if ($template eq 'clean') { - $info = $delaymsg; + if ( $template eq 'clean' ) { + $info = $delaymsg; $delay = $result->delay; } else { - $info = sprintf( 'Verspätung ca. %d Min.%s%s', - $result->delay, $delaymsg ? q{: } : q{}, $delaymsg ); + $info = sprintf( 'Verspätung ca. %d Min.%s%s', + $result->delay, $delaymsg ? q{: } : q{}, $delaymsg ); } } if ( $info and $qosmsg ) { |