diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-01-10 18:52:51 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-01-10 18:52:51 +0100 |
commit | 59c37b4d0d67f71416e385bf4a3e07bdd68c28fa (patch) | |
tree | d7b04bc4750d8544c2c49c33abe321dd94ca9540 | |
parent | 99b1a06f4341bf251a293addfe9eedadd711c3ee (diff) |
Switch to VRN as default HAFAS service
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 6 | ||||
-rw-r--r-- | lib/DBInfoscreen/Helper/HAFAS.pm | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 2951ab9..e8a6721 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -60,7 +60,7 @@ sub handle_no_results { } elsif ($hafas) { $self->render_later; - my $service = 'DB'; + my $service = 'VRN'; if ( $hafas ne '1' and Travel::Status::DE::HAFAS::get_service($hafas) ) { $service = $hafas; @@ -381,7 +381,7 @@ sub get_results_p { ); } if ( $opt{hafas} ) { - my $service = 'DB'; + my $service = 'VRN'; if ( $opt{hafas} ne '1' and Travel::Status::DE::HAFAS::get_service( $opt{hafas} ) ) { @@ -2332,7 +2332,7 @@ sub stations_by_coordinates { return; } - my $service = 'DB'; + my $service = 'VRN'; if ( $hafas and $hafas ne '1' and Travel::Status::DE::HAFAS::get_service($hafas) ) diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm index 0400d59..fe0caa5 100644 --- a/lib/DBInfoscreen/Helper/HAFAS.pm +++ b/lib/DBInfoscreen/Helper/HAFAS.pm @@ -50,7 +50,7 @@ sub get_route_p { if ( $opt{trip_id} ) { $hafas_promise = Travel::Status::DE::HAFAS->new_p( - service => $opt{service}, + service => $opt{service} // 'VRN', journey => { id => $opt{trip_id}, }, @@ -69,6 +69,7 @@ sub get_route_p { } $hafas_promise //= Travel::Status::DE::HAFAS->new_p( + service => $opt{service} // 'VRN', journeyMatch => $opt{train_req} =~ s{^- }{}r, datetime => ( $opt{train} ? $opt{train}->start : $opt{datetime} ), language => $opt{language}, @@ -99,6 +100,7 @@ sub get_route_p { } return Travel::Status::DE::HAFAS->new_p( + service => $opt{service} // 'VRN', journey => { id => $result->id, }, @@ -264,7 +266,7 @@ sub get_polyline_p { my $trip_id = $opt{id}; my $line = $opt{line}; - my $service = $opt{service}; + my $service = $opt{service} // 'VRN'; my $promise = Mojo::Promise->new; Travel::Status::DE::HAFAS->new_p( |