diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-07-13 15:39:57 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-07-13 15:39:57 +0200 |
commit | 663e65fa6cfa7205ee50aaf358dc30b42b44e17a (patch) | |
tree | bd3c44e437befe46b541c99c0f98c30524f79fac | |
parent | 4a5ba9dbe439f5d02a4973c896b063bcf58196c2 (diff) |
db-fakedisplay: Ignore platform parts
-rwxr-xr-x | bin/db-fakedisplay | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/db-fakedisplay b/bin/db-fakedisplay index f9a4831..11a2cbe 100755 --- a/bin/db-fakedisplay +++ b/bin/db-fakedisplay @@ -34,7 +34,7 @@ my $status = Travel::Status::DE::DeutscheBahn->new( my @params; for my $platform (@platforms) { - my $info = first { $_->platform eq $platform } $status->results; + my $info = first { $_->platform =~ m{ ^ $platform (?: \s | $ )}x } $status->results; if (not defined $info) { push(@params, { @@ -48,7 +48,7 @@ for my $platform (@platforms) { train => $info->train, via => [ map { { stop => $_ } } $info->route_interesting(3) ], destination => $info->destination, - platform => $info->platform, + platform => (split(/ /, $info->platform))[0], info => $info->info, }); } |