summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-09-18 18:08:06 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-09-18 18:08:06 +0200
commitaac8e2a0e1b870e9c40cecd15fd3d2fdfd484869 (patch)
treea89d68b2c832c5cb82dfbb5097f78d915ef163db
parent2075c896559a460a147484845c93e202cc7301ef (diff)
Save scheduled arrival time for cancelled trains1.9.3
-rwxr-xr-xlib/Travelynx.pm11
-rw-r--r--templates/landingpage.html.ep6
2 files changed, 9 insertions, 8 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index 7d3548e..860ba87 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -585,9 +585,10 @@ sub startup {
);
}
- if ( not( defined $train or $force ) ) {
+ if ( not defined $train ) {
- # Arrival time via IRIS is unknown, try falling back to HAFAS
+ # Arrival time via IRIS is unknown, so the train probably has not
+ # arrived yet. Fall back to HAFAS.
if ( my $station_data
= first { $_->[0] eq $station } @{ $journey->{route} } )
{
@@ -611,8 +612,10 @@ sub startup {
);
}
}
- $self->run_hook( $uid, 'update' );
- return ( 1, undef );
+ if ( not $force ) {
+ $self->run_hook( $uid, 'update' );
+ return ( 1, undef );
+ }
}
my $has_arrived = 0;
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep
index 1542fab..ad80350 100644
--- a/templates/landingpage.html.ep
+++ b/templates/landingpage.html.ep
@@ -26,10 +26,8 @@
ab <%= $status->{dep_name} %>, doch dieser Zug fällt aus.
</p>
<p>Falls du den Zugausfall z.B. für ein Fahrgastrechteformular
- dokumentieren möchtest, wähle bitte jetzt deine geplante
- Zielstation aus. Achtung: Momentan wird dabei keine
- Soll-Ankunftszeit gespeichert, das zu beheben steht auf
- der Todoliste.</p>
+ dokumentieren möchtest, wähle bitte jetzt die geplante
+ Zielstation aus.</p>
<table>
<tbody>
% my $is_after = 0;