summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Traveling.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-08-13 12:51:15 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-08-13 12:51:15 +0200
commit0604dd80f8b79233279093d14b7a2c55f77740ca (patch)
treec09ad99a97e1273fac67dd2aa26132018df5090e /lib/Travelynx/Controller/Traveling.pm
parent944688cfff5ee4c886adbe856889ab1e40bd58ac (diff)
WIP: HAFAS support
Diffstat (limited to 'lib/Travelynx/Controller/Traveling.pm')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index 3e051a1..39c8e8f 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -747,7 +747,12 @@ sub travel_action {
else {
my $redir = '/';
if ( $status->{checked_in} or $status->{cancelled} ) {
- $redir = '/s/' . $status->{dep_ds100};
+ if ( $status->{dep_ds100} ) {
+ $redir = '/s/' . $status->{dep_ds100};
+ }
+ else {
+ $redir = '/s/' . $status->{dep_eva} . '?hafas=1';
+ }
}
$self->render(
json => {
@@ -880,7 +885,7 @@ sub station {
if ($use_hafas) {
$promise = $self->hafas->get_departures_p(
eva => $station,
- lookbehind => 120,
+ lookbehind => 30,
lookahead => 30,
);
}