Unverified Commit ed1ae5cd authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

$product->name: Handle ÖBB "Zug-Nr." in-band annotations

parent 830badd9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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}