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

dbris-m: show operator if it changes along the route

parent b4ecfde6
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -399,6 +399,11 @@ elsif ( $opt{journey} and not( $raw_json_output or $json_output ) ) {
	}
	say q{};

	my $prev_operator;
	if ( scalar $trip->operators > 1 ) {
		$prev_operator = q{};
	}

	my $prev_trip_no;
	if ( scalar $trip->trip_numbers > 1 ) {
		$prev_trip_no = q{};
@@ -437,6 +442,14 @@ elsif ( $opt{journey} and not( $raw_json_output or $json_output ) ) {
			print($output_reset);
		}

		if (    defined $prev_operator
			and defined $stop->operator
			and $stop->operator ne $prev_operator )
		{
			printf( '  %s', $stop->operator );
			$prev_operator = $stop->operator;
		}

		if (    defined $prev_trip_no
			and defined $stop->trip_no
			and $stop->trip_no ne $prev_trip_no )