summaryrefslogtreecommitdiff
path: root/cgi/index.pl
diff options
context:
space:
mode:
Diffstat (limited to 'cgi/index.pl')
-rw-r--r--cgi/index.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/cgi/index.pl b/cgi/index.pl
index edb112d..27d0fb1 100644
--- a/cgi/index.pl
+++ b/cgi/index.pl
@@ -11,7 +11,7 @@ use Travel::Status::DE::VRR;
no warnings 'uninitialized';
-our $VERSION = '0.05';
+our $VERSION = '0.06';
my %default = (
backend => 'vrr',
@@ -152,6 +152,7 @@ sub render_image {
my ( @grep_line, @grep_platform );
my $offset = 0;
+ my $displayed_lines = 0;
my ( $results, $errstr ) = get_results( $backend, $city, $stop );
@@ -258,6 +259,7 @@ sub render_image {
$png->draw_at( 0, $line );
$png->draw_at( 25, $destination );
+ $displayed_lines++;
if ( length($etr) > 2 ) {
$png->draw_at( 145, $etr );
@@ -275,6 +277,11 @@ sub render_image {
$png->new_line();
}
+ if ($displayed_lines == 0) {
+ $png->new_line();
+ $png->new_line();
+ $png->draw_at(50, 'no departures');
+ }
$self->render( data => $png->png );
}