diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-04-02 17:50:17 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-04-02 17:50:17 +0200 |
commit | 2a7f9400a751b0a301c06d09d294439572926e7b (patch) | |
tree | bea4cdfa92c27cb2e1ae538be163849e6381ac27 | |
parent | 31d7ba0f7b9098505bcf91246933a50e6c2e89d5 (diff) |
HAFAS, DBRIS: handle selection of cancelled destinations2.11.12
-rwxr-xr-x | lib/Travelynx.pm | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 50f07de..ab32067 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -1241,7 +1241,7 @@ sub startup { my $has_arrived; for my $stop ( @{ $journey->{route_after} } ) { if ( $station eq $stop->[0] or $station eq $stop->[1] ) { - $found = 1; + $found = $stop; $self->in_transit->set_arrival_eva( uid => $uid, db => $db, @@ -1309,6 +1309,22 @@ sub startup { uid => $uid ); } + elsif ( $found and $found->[2]{isCancelled} ) { + $journey = $self->in_transit->get( + uid => $uid, + db => $db + ); + $journey->{cancelled} = 1; + $self->journeys->add_from_in_transit( + db => $db, + journey => $journey + ); + $self->in_transit->set_cancelled_destination( + uid => $uid, + db => $db, + cancelled_destination => $found->[0], + ); + } if ($tx) { $tx->commit; |