summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-12-29 15:50:15 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-12-29 15:50:15 +0100
commit7e5d76385927dff73961a4b4e69d1bfa0b28b208 (patch)
treecbdc744c71090624f3ecfa3614c4daa2442bc8da /lib
parentfd0dba754603caf023e36f755b40e41e8ea9faf5 (diff)
IRIs.pm: Ignore "1" messages (no information content, apparently
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/IRIS.pm4
1 files changed, 3 insertions, 1 deletions
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 ];
}
}