diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-04-27 12:45:53 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-04-27 12:45:53 +0200 |
commit | 83dc422c3a0ba2243e2ed22410a9de0e9bb502b0 (patch) | |
tree | c28230c20f6ab9beb8d6c3aeb5fd5ae3c239e228 | |
parent | dd1b29bc9a1813bc2151635f98231213d3453e78 (diff) |
Update DBWagenreihung usage for v0.13
-rw-r--r-- | cpanfile | 2 | ||||
-rw-r--r-- | lib/DBInfoscreen/Controller/Wagenreihung.pm | 4 | ||||
-rw-r--r-- | templates/wagenreihung.html.ep | 4 |
3 files changed, 5 insertions, 5 deletions
@@ -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 @@ % } <div class="container"> <div style="text-align: center;"> -%= join( ' / ', $wr->origins ) +%= join( ' / ', map { $_->{name} } $wr->origins ) → %= join( ' / ', map { $_->{name} } $wr->destinations ) </div> @@ -28,7 +28,7 @@ % } </div> % } - <%= $wr->station_name %> Gleis <%= $wr->platform %><br/> + <%= $wr->station->{name} %> Gleis <%= $wr->platform %><br/> % for my $desc ($wr->train_descriptions) { % if ($desc->{text}) { %= $desc->{text} |