diff options
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r-- | lib/DBInfoscreen/Helper/HAFAS.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm index 8d4c89f..249d308 100644 --- a/lib/DBInfoscreen/Helper/HAFAS.pm +++ b/lib/DBInfoscreen/Helper/HAFAS.pm @@ -204,6 +204,10 @@ sub trainsearch_p { $opt{date_yyyy} = $now->strftime('%d.%m.%Y'); } + # IRIS reports trains with unknown type as type "-". HAFAS thinks otherwise + # and prefers the type to be left out entirely in this case. + $opt{train_req} =~ s{^- }{}; + my $promise = Mojo::Promise->new; $self->get_json_p( $self->{realtime_cache}, |