summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpanfile2
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm5
-rw-r--r--lib/Travelynx/Helper/DBRIS.pm2
-rw-r--r--lib/Travelynx/Helper/EFA.pm7
-rw-r--r--lib/Travelynx/Model/Stations.pm3
5 files changed, 13 insertions, 6 deletions
diff --git a/cpanfile b/cpanfile
index 2c8979b..8292fb4 100644
--- a/cpanfile
+++ b/cpanfile
@@ -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';
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index 0437556..40802f4 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -49,7 +49,8 @@ sub get_connecting_trains_p {
# cases. But not reliably. Probably best to leave it out entirely then.
return $promise->reject;
}
- if ($user->{backend_efa}) {
+ if ( $user->{backend_efa} ) {
+
# TODO
return $promise->reject;
}
@@ -1340,7 +1341,7 @@ sub station {
}
my $connections_p;
- if ( $trip_id and $hafas_service ) {
+ if ( $trip_id and ( $dbris_service or $hafas_service ) ) {
@results = grep { $_->id eq $trip_id } @results;
}
elsif ( $train and not $hafas_service ) {
diff --git a/lib/Travelynx/Helper/DBRIS.pm b/lib/Travelynx/Helper/DBRIS.pm
index 9ddaa5f..1b7f099 100644
--- a/lib/Travelynx/Helper/DBRIS.pm
+++ b/lib/Travelynx/Helper/DBRIS.pm
@@ -69,7 +69,7 @@ sub get_departures_p {
my $agent = $self->{user_agent};
- if ( $opt{station} =~ m{ [@] L = (?<eva> \d+ ) [@] }x ) {
+ if ( $opt{station} =~ m{ [@] L = (?<eva> \d+ ) }x ) {
$opt{station} = {
eva => $+{eva},
id => $opt{station},
diff --git a/lib/Travelynx/Helper/EFA.pm b/lib/Travelynx/Helper/EFA.pm
index ba11764..5cae51b 100644
--- a/lib/Travelynx/Helper/EFA.pm
+++ b/lib/Travelynx/Helper/EFA.pm
@@ -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 {
diff --git a/lib/Travelynx/Model/Stations.pm b/lib/Travelynx/Model/Stations.pm
index bf35d1a..c6d9730 100644
--- a/lib/Travelynx/Model/Stations.pm
+++ b/lib/Travelynx/Model/Stations.pm
@@ -205,6 +205,9 @@ sub add_or_update {
);
return;
}
+ if (not $stop->latlon) {
+ die('Backend Error: Stop "' . $stop->full_name . '" has no geo coordinates');
+ }
$opt{db}->insert(
'stations',
{