From 83dc422c3a0ba2243e2ed22410a9de0e9bb502b0 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 27 Apr 2024 12:45:53 +0200 Subject: Update DBWagenreihung usage for v0.13 --- cpanfile | 2 +- lib/DBInfoscreen/Controller/Wagenreihung.pm | 4 ++-- templates/wagenreihung.html.ep | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpanfile b/cpanfile index 06418d5..a955232 100644 --- a/cpanfile +++ b/cpanfile @@ -10,7 +10,7 @@ requires 'List::UtilsBy'; requires 'LWP::UserAgent'; requires 'LWP::Protocol::https'; requires 'Mojolicious'; -requires 'Travel::Status::DE::DBWagenreihung', '0.12'; +requires 'Travel::Status::DE::DBWagenreihung', '== 0.13'; requires 'Travel::Status::DE::HAFAS', '>= 5.06'; requires 'Travel::Status::DE::IRIS'; requires 'XML::LibXML'; diff --git a/lib/DBInfoscreen/Controller/Wagenreihung.pm b/lib/DBInfoscreen/Controller/Wagenreihung.pm index 1708285..f4fea89 100644 --- a/lib/DBInfoscreen/Controller/Wagenreihung.pm +++ b/lib/DBInfoscreen/Controller/Wagenreihung.pm @@ -72,7 +72,7 @@ sub wagenreihung { e => $exit_side ? substr( $exit_side, 0, 1 ) : '', tt => $wr->train_type, tn => $train, - s => $wr->station_name, + s => $wr->station->{name}, p => $wr->platform }; @@ -168,7 +168,7 @@ sub wagenreihung { 'wagenreihung', description => sprintf( 'Ist-Wagenreihung %s in %s', - $title, $wr->station_name + $title, $wr->station->{name} ), wr_error => undef, title => $title, diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep index 493d9c6..a68590b 100644 --- a/templates/wagenreihung.html.ep +++ b/templates/wagenreihung.html.ep @@ -17,7 +17,7 @@ % }
-%= join( ' / ', $wr->origins ) +%= join( ' / ', map { $_->{name} } $wr->origins ) → %= join( ' / ', map { $_->{name} } $wr->destinations )
@@ -28,7 +28,7 @@ % }
% } - <%= $wr->station_name %> Gleis <%= $wr->platform %>
+ <%= $wr->station->{name} %> Gleis <%= $wr->platform %>
% for my $desc ($wr->train_descriptions) { % if ($desc->{text}) { %= $desc->{text} -- cgit v1.2.3