summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Travelynx/Controller/Account.pm1
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm3
-rw-r--r--lib/Travelynx/Helper/HAFAS.pm11
3 files changed, 9 insertions, 6 deletions
diff --git a/lib/Travelynx/Controller/Account.pm b/lib/Travelynx/Controller/Account.pm
index 1c54aec..9cd0edb 100644
--- a/lib/Travelynx/Controller/Account.pm
+++ b/lib/Travelynx/Controller/Account.pm
@@ -1075,6 +1075,7 @@ sub backend_form {
# operational and are thus useless for travelynx
if ( $backend->{name} eq 'Resrobot'
or $backend->{name} eq 'TPG'
+ or $backend->{name} eq 'VRN'
or $backend->{name} eq 'DB' )
{
$type = undef;
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index dd16c45..1ca9d4a 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -1140,7 +1140,8 @@ sub station {
)->wait;
}
elsif ( $err
- =~ m{svcRes|connection close|Service Temporarily Unavailable} )
+ =~ m{svcRes|connection close|Service Temporarily Unavailable|Forbidden}
+ )
{
$self->render(
'bad_gateway',
diff --git a/lib/Travelynx/Helper/HAFAS.pm b/lib/Travelynx/Helper/HAFAS.pm
index 5b5d343..ebf44d2 100644
--- a/lib/Travelynx/Helper/HAFAS.pm
+++ b/lib/Travelynx/Helper/HAFAS.pm
@@ -7,6 +7,7 @@ package Travelynx::Helper::HAFAS;
use strict;
use warnings;
use 5.020;
+use utf8;
use DateTime;
use Encode qw(decode);
@@ -43,7 +44,7 @@ sub get_service {
sub get_departures_p {
my ( $self, %opt ) = @_;
- $opt{service} //= 'VRN';
+ $opt{service} //= 'ÖBB';
my $agent = $self->{user_agent};
if ( my $proxy = $self->{service_config}{ $opt{service} }{proxy} ) {
@@ -72,7 +73,7 @@ sub get_departures_p {
sub search_location_p {
my ( $self, %opt ) = @_;
- $opt{service} //= 'VRN';
+ $opt{service} //= 'ÖBB';
my $agent = $self->{user_agent};
if ( my $proxy = $self->{service_config}{ $opt{service} }{proxy} ) {
@@ -99,7 +100,7 @@ sub get_tripid_p {
my $train_desc = $train->type . ' ' . $train->train_no;
$train_desc =~ s{^- }{};
- $opt{service} //= 'VRN';
+ $opt{service} //= 'ÖBB';
my $agent = $self->{user_agent};
if ( my $proxy = $self->{service_config}{ $opt{service} }{proxy} ) {
@@ -160,7 +161,7 @@ sub get_journey_p {
my $promise = Mojo::Promise->new;
my $now = DateTime->now( time_zone => 'Europe/Berlin' );
- $opt{service} //= 'VRN';
+ $opt{service} //= 'ÖBB';
my $agent = $self->{user_agent};
if ( my $proxy = $self->{service_config}{ $opt{service} }{proxy} ) {
@@ -210,7 +211,7 @@ sub get_route_p {
my $promise = Mojo::Promise->new;
my $now = DateTime->now( time_zone => 'Europe/Berlin' );
- $opt{service} //= 'VRN';
+ $opt{service} //= 'ÖBB';
my $agent = $self->{user_agent};
if ( my $proxy = $self->{service_config}{ $opt{service} }{proxy} ) {