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

share/enhance: handle multi-stop stations

parent 4c41144a
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -24,12 +24,12 @@ for my $station ( @{$stations} ) {
			say '    not found';
			next;
		}
		my $result = ($hafas->results)[0];
		if ($result->name ne $station->{name}) {
			say '    name mismatch: got ' . $result->name;
			next;
		}
		for my $result ( $hafas->results ) {
			if ( $result->name eq $station->{name} ) {
				$station->{latlong} = [ $result->lat, $result->lon ];
				last;
			}
		}
	}
}