diff options
Diffstat (limited to 'lib/DBInfoscreen')
| -rw-r--r-- | lib/DBInfoscreen/Controller/Map.pm | 4 | ||||
| -rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 11 | ||||
| -rw-r--r-- | lib/DBInfoscreen/Helper/HAFAS.pm | 9 | 
3 files changed, 15 insertions, 9 deletions
| diff --git a/lib/DBInfoscreen/Controller/Map.pm b/lib/DBInfoscreen/Controller/Map.pm index 9c83a07..294471d 100644 --- a/lib/DBInfoscreen/Controller/Map.pm +++ b/lib/DBInfoscreen/Controller/Map.pm @@ -507,7 +507,7 @@ sub route {  		return $self->route_efa;  	} -	my $service = 'VRN'; +	my $service = 'ÖBB';  	if (    $hafas  		and $hafas ne '1'  		and Travel::Status::DE::HAFAS::get_service($hafas) ) @@ -784,7 +784,7 @@ sub ajax_route {  	my $line_no = $self->stash('lineno');  	my $hafas   = $self->param('hafas'); -	my $service = 'VRN'; +	my $service = 'ÖBB';  	if (    $hafas  		and $hafas ne '1'  		and Travel::Status::DE::HAFAS::get_service($hafas) ) diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 5171a21..afcb293 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -71,7 +71,7 @@ sub handle_no_results {  	}  	elsif ($hafas) {  		$self->render_later; -		my $service = 'VRN'; +		my $service = 'ÖBB';  		if ( $hafas ne '1' and Travel::Status::DE::HAFAS::get_service($hafas) )  		{  			$service = $hafas; @@ -433,7 +433,7 @@ sub get_results_p {  		);  	}  	if ( $opt{hafas} ) { -		my $service = 'VRN'; +		my $service = 'ÖBB';  		if ( $opt{hafas} ne '1'  			and Travel::Status::DE::HAFAS::get_service( $opt{hafas} ) )  		{ @@ -2734,7 +2734,7 @@ sub stations_by_coordinates {  		return;  	} -	my $service = 'VRN'; +	my $service = 'ÖBB';  	if (    $hafas  		and $hafas ne '1'  		and Travel::Status::DE::HAFAS::get_service($hafas) ) @@ -2908,6 +2908,11 @@ sub backend_list {  			# (I bet it's actually Permanently Unavailable)  			next;  		} +		if ( $backend->{shortname} eq 'VRN' ) { + +			# HTTP 403 Forbidden as of 2025-03-03 +			next; +		}  		push(  			@backends,  			{ diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm index 6c38973..e16bad8 100644 --- a/lib/DBInfoscreen/Helper/HAFAS.pm +++ b/lib/DBInfoscreen/Helper/HAFAS.pm @@ -7,6 +7,7 @@ package DBInfoscreen::Helper::HAFAS;  use strict;  use warnings;  use 5.020; +use utf8;  use DateTime;  use Encode qw(decode encode); @@ -58,7 +59,7 @@ sub get_route_p {  	if ( $opt{trip_id} ) {  		$hafas_promise = Travel::Status::DE::HAFAS->new_p( -			service => $opt{service} // 'VRN', +			service => $opt{service} // 'ÖBB',  			journey => {  				id => $opt{trip_id},  			}, @@ -77,7 +78,7 @@ sub get_route_p {  	}  	$hafas_promise //= Travel::Status::DE::HAFAS->new_p( -		service      => $opt{service} // 'VRN', +		service      => $opt{service} // 'ÖBB',  		journeyMatch => $opt{train_req} =~ s{^- }{}r,  		datetime     => ( $opt{train} ? $opt{train}->start : $opt{datetime} ),  		language     => $opt{language}, @@ -108,7 +109,7 @@ sub get_route_p {  			}  			return Travel::Status::DE::HAFAS->new_p( -				service => $opt{service} // 'VRN', +				service => $opt{service} // 'ÖBB',  				journey => {  					id => $result->id,  				}, @@ -274,7 +275,7 @@ sub get_polyline_p {  	my $trip_id = $opt{id};  	my $line    = $opt{line}; -	my $service = $opt{service} // 'VRN'; +	my $service = $opt{service} // 'ÖBB';  	my $promise = Mojo::Promise->new;  	my $agent = $self->{user_agent}; | 
