summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Helper/HAFAS.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-10-30 09:29:41 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-10-30 09:29:41 +0200
commit516b88941c6c065e8773dc6091d29025d8d0b330 (patch)
treef93aec8259b03725b1e7deefdf4d38d536d8f796 /lib/DBInfoscreen/Helper/HAFAS.pm
parent8dd73ca07434da6572c517fe90e271f79c183b73 (diff)
HAFAS: Hide unhelpful messages
Diffstat (limited to 'lib/DBInfoscreen/Helper/HAFAS.pm')
-rw-r--r--lib/DBInfoscreen/Helper/HAFAS.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm
index 91661a2..31615b1 100644
--- a/lib/DBInfoscreen/Helper/HAFAS.pm
+++ b/lib/DBInfoscreen/Helper/HAFAS.pm
@@ -186,6 +186,16 @@ sub get_xml_p {
my $header = $message->getAttribute('header');
my $lead = $message->getAttribute('lead');
my $display = $message->getAttribute('display');
+
+ # "something is wrong, but we're not telling what" is not helpful.
+ # Observed on RRX lines in NRW
+ if ( $header
+ =~ m{ : \s St..?rung. \s \(Quelle: \s zuginfo.nrw \) $ }x
+ and not $lead )
+ {
+ next;
+ }
+
push(
@{ $ret->{messages} },
{