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

EFA: trip IDs should include a time, not just a date

Closes #243
parent 9be80133
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ requires 'Mojolicious::Plugin::OAuth2';
requires 'Mojo::Pg';
requires 'Text::CSV';
requires 'Text::Markdown';
requires 'Travel::Status::DE::EFA', '>= 3.10';
requires 'Travel::Status::DE::EFA', '>= 3.12';
requires 'Travel::Status::MOTIS', '>= 0.01';
requires 'Travel::Status::DE::DBRIS', '>= 0.10';
requires 'Travel::Status::DE::HAFAS', '>= 6.20';
+2 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ sub get_connecting_trains_p {
		return $promise->reject;
	}
	if ( $user->{backend_efa} ) {

		# TODO
		return $promise->reject;
	}
+5 −2
Original line number Diff line number Diff line
@@ -55,12 +55,15 @@ sub get_journey_p {
	my $agent   = $self->{user_agent};
	my $stopseq;

	if ( $opt{trip_id} =~ m{ ^ ([^@]*) @ ([^@]*) [(] ([^)]*) [)] (.*)  $ }x ) {
	if ( $opt{trip_id}
		=~ m{ ^ ([^@]*) @ ([^@]*) [(] ([^T]*) T ([^)]*) [)] (.*) $ }x )
	{
		$stopseq = {
			stateless => $1,
			stop_id   => $2,
			date      => $3,
			key       => $4
			time      => $4,
			key       => $5
		};
	}
	else {