From 5e3651a996ac68cb664e42103a15922d4168e0db Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 10 Jan 2025 19:22:33 +0100 Subject: HAFAS: Use VRN as default backend Notable, this retores data augmentation for IRIS checkins --- lib/Travelynx/Helper/HAFAS.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/Travelynx/Helper/HAFAS.pm b/lib/Travelynx/Helper/HAFAS.pm index a8ab395..207fadb 100644 --- a/lib/Travelynx/Helper/HAFAS.pm +++ b/lib/Travelynx/Helper/HAFAS.pm @@ -97,7 +97,7 @@ sub get_departures_p { : DateTime->now( time_zone => 'Europe/Berlin' ) )->subtract( minutes => $opt{lookbehind} ); return Travel::Status::DE::HAFAS->new_p( - service => $opt{service}, + service => $opt{service} // 'VRN', station => $opt{eva}, datetime => $when, lookahead => $opt{lookahead} + $opt{lookbehind}, @@ -112,7 +112,7 @@ sub search_location_p { my ( $self, %opt ) = @_; return Travel::Status::DE::HAFAS->new_p( - service => $opt{service}, + service => $opt{service} // 'VRN', locationSearch => $opt{query}, cache => $self->{realtime_cache}, promise => 'Mojo::Promise', @@ -130,7 +130,7 @@ sub get_tripid_p { $train_desc =~ s{^- }{}; Travel::Status::DE::HAFAS->new_p( - service => $opt{service}, + service => $opt{service} // 'VRN', journeyMatch => $train_desc, datetime => $train->start, cache => $self->{realtime_cache}, @@ -182,7 +182,7 @@ sub get_journey_p { my $now = DateTime->now( time_zone => 'Europe/Berlin' ); Travel::Status::DE::HAFAS->new_p( - service => $opt{service}, + service => $opt{service} // 'VRN', journey => { id => $opt{trip_id}, }, @@ -223,7 +223,7 @@ sub get_route_p { my $now = DateTime->now( time_zone => 'Europe/Berlin' ); Travel::Status::DE::HAFAS->new_p( - service => $opt{service}, + service => $opt{service} // 'VRN', journey => { id => $opt{trip_id}, -- cgit v1.2.3