summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Travel/Status/DE/HAFAS/Product.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/Product.pm b/lib/Travel/Status/DE/HAFAS/Product.pm
index 14cc018..42b264b 100644
--- a/lib/Travel/Status/DE/HAFAS/Product.pm
+++ b/lib/Travel/Status/DE/HAFAS/Product.pm
@@ -32,12 +32,20 @@ sub new {
my $train_no = $product->{prodCtx}{num};
my $cat = $product->{prodCtx}{catOut};
my $catlong = $product->{prodCtx}{catOutL};
+
+ # ÖBB, you so silly
+ if ( $name and $name =~ m{Zug-Nr} and $product->{nameS} ) {
+ $name = $product->{nameS};
+ }
+
if ( $name and $cat and $name eq $cat and $product->{nameS} ) {
$name .= ' ' . $product->{nameS};
}
+
if ( defined $train_no and not $train_no ) {
$train_no = undef;
}
+
if (
not defined $line_no
and defined $product->{prodCtx}{matchId}