From 7e5d76385927dff73961a4b4e69d1bfa0b28b208 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 29 Dec 2014 15:50:15 +0100 Subject: IRIs.pm: Ignore "1" messages (no information content, apparently --- lib/Travel/Status/DE/IRIS.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Travel/Status') diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm index f326195..e91d04b 100644 --- a/lib/Travel/Status/DE/IRIS.pm +++ b/lib/Travel/Status/DE/IRIS.pm @@ -224,7 +224,9 @@ sub get_realtime { my $msgid = $e_m->getAttribute('id'); my $ts = $e_m->getAttribute('ts'); - if ($value) { + # 0 and 1 (with key "f") are related to canceled trains and + # do not appear to hold information + if (defined $value and $value > 1) { $messages{$msgid} = [ $ts, $type, $value ]; } } -- cgit v1.2.3