summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog4
-rwxr-xr-xbin/db-iris6
2 files changed, 9 insertions, 1 deletions
diff --git a/Changelog b/Changelog
index bc56270..d759f57 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,7 @@
+git HEAD
+
+ * Fix --track-via <stop> not matching trains changing their ID at <stop>
+
Travel::Status::DE::IRIS 0.03 - Fri Feb 14 2014
* IRIS / db-iris: Add lookahead option
diff --git a/bin/db-iris b/bin/db-iris
index ffd70bf..f1bff19 100755
--- a/bin/db-iris
+++ b/bin/db-iris
@@ -302,7 +302,11 @@ for my $d ( $status->results() ) {
if ( not $d->departure ) {
next;
}
- my $d_via = first { $_->train_id eq $d->train_id } $status_via->results;
+ my $d_via = first {
+ $_->train_id eq $d->train_id
+ or ( $_->old_train_id and $_->old_train_id eq $d->train_id );
+ }
+ $status_via->results;
if ( not $d_via
or not $d_via->sched_arrival
or $d_via->sched_arrival < $d->departure )