From da87e97a0b954860e0a53b8a0f475580d44ad73d Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 21 Jun 2025 20:48:53 +0200 Subject: Add bare-bones support for manual checkins (still bound to a specific backend) Extension opportunities (maybe, eventually) * provide datetimes of intermediate stops * provide an API for real-time data updates * look up stops that travelynx does not yet know about rather than rejecting them outright --- lib/Travelynx/Model/Journeys.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/Travelynx/Model/Journeys.pm') diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index 0fb663e..876786a 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -283,8 +283,14 @@ sub add_from_in_transit { my $db = $opt{db}; my $journey = $opt{journey}; + if ( $journey->{train_id} eq 'manual' ) { + $journey->{edited} = 0x3fff; + } + else { + $journey->{edited} = 0; + } + delete $journey->{data}; - $journey->{edited} = 0; $journey->{checkout_time} = DateTime->now( time_zone => 'Europe/Berlin' ); return $db->insert( 'journeys', $journey, { returning => 'id' } ) -- cgit v1.2.3