summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-05-19 18:21:36 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-05-19 18:21:36 +0200
commit24b08c5ab7054753090e1808d48dc828e0ae2eeb (patch)
treec6d6eef76fdc106bfed2237099c8212dab742438 /lib
parent6116d951eded4f793a34bb803c76b7ad58338343 (diff)
EFA: respect rt=1
Diffstat (limited to 'lib')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index f537064..93388fa 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -360,7 +360,6 @@ sub get_results_p {
{
$service = $opt{efa};
}
- say "EFA $service";
return Travel::Status::DE::EFA->new_p(
service => $service,
name => $station,
@@ -1477,7 +1476,15 @@ sub handle_efa {
}
for my $result ( $efa->results ) {
- my $time = $result->sched_datetime->strftime('%H:%M');
+ my $time;
+
+ if ( $show_realtime and $result->rt_datetime ) {
+ $time = $result->rt_datetime->strftime('%H:%M');
+ }
+ else {
+ $time = $result->sched_datetime->strftime('%H:%M');
+ }
+
my $linetype = $result->mot_name // 'bahn';
if ( $linetype eq 's-bahn' ) {
$linetype = 'sbahn';
@@ -1494,7 +1501,6 @@ sub handle_efa {
elsif ( $linetype eq 'sonstige' ) {
$linetype = 'ext';
}
- say $result->line . " : $linetype";
push(
@departures,
{