summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Controller/Stationboard.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-12-22 23:01:46 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2023-12-22 23:01:46 +0100
commit07bcce9b4129552ceaa1e48998b4f7720929fa20 (patch)
tree2e2930f374d5d7eace613be59f391b86f0c2fff2 /lib/DBInfoscreen/Controller/Stationboard.pm
parentf357bb52cd0acf6ba7039ef4af0282388b5c8a87 (diff)
Switch to T-S-DE-HAFAS 5.034.19.4
Diffstat (limited to 'lib/DBInfoscreen/Controller/Stationboard.pm')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index 66c938c..23a6ee2 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -834,7 +834,9 @@ sub render_train {
my @missing_pre;
for my $station (@hafas_stations) {
if (
- List::MoreUtils::any { $_->{name} eq $station->{name} }
+ List::MoreUtils::any {
+ $_->{name} eq $station->loc->name
+ }
@iris_stations
)
{
@@ -847,7 +849,7 @@ sub render_train {
push(
@missing_pre,
{
- name => $station->{name},
+ name => $station->loc->name,
hafas => 1
}
);
@@ -857,7 +859,9 @@ sub render_train {
my @missing_post;
for my $station ( reverse @hafas_stations ) {
if (
- List::MoreUtils::any { $_->{name} eq $station->{name} }
+ List::MoreUtils::any {
+ $_->{name} eq $station->loc->name
+ }
@iris_stations
)
{
@@ -870,7 +874,7 @@ sub render_train {
unshift(
@missing_post,
{
- name => $station->{name},
+ name => $station->loc->name,
hafas => 1
}
);
@@ -1202,7 +1206,7 @@ sub train_details {
$res->{operator} = $journey->operator;
$res->{route_post_diff}
- = [ map { { name => $_->{name} } } $journey->route ];
+ = [ map { { name => $_->loc->name } } $journey->route ];
for my $elem ( @{ $res->{route_post_diff} } ) {
for my $key ( keys %{ $route_ts->{ $elem->{name} } // {} } ) {
$elem->{$key} = $route_ts->{ $elem->{name} }{$key};
@@ -1709,7 +1713,7 @@ sub handle_result {
train_no => $result->number,
journey_id => $result->id,
via => [
- map { $_->{name} =~ s{,\Q$city\E}{}r }
+ map { $_->loc->name =~ s{,\Q$city\E}{}r }
$result->route_interesting(3)
],
destination => $result->route_end =~ s{,\Q$city\E}{}r,
@@ -1725,10 +1729,10 @@ sub handle_result {
replaced_by => [],
replacement_for => [],
route_pre => $admode eq 'arr'
- ? [ map { $_->{name} } $result->route ]
+ ? [ map { $_->loc->name } $result->route ]
: [],
route_post => $admode eq 'arr' ? []
- : [ map { $_->{name} } $result->route ],
+ : [ map { $_->loc->name } $result->route ],
wr_link => $result->sched_datetime
? $result->sched_datetime->strftime('%Y%m%d%H%M')
: undef,