summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-09-23 20:19:34 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-09-23 20:19:34 +0200
commit0526f8880055fe4b559e857bd3b321bdc63ab525 (patch)
treebe31c03bc33f60c12902f29bc7c4ab45ba5cbc14 /lib/DBInfoscreen
parentd24433cc9c8de00464d614d19281a812a849cb91 (diff)
prominently show zuginfo.nrw links in train details3.3.4
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index 2013669..cba737c 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -411,6 +411,7 @@ sub format_hafas_result_info {
sub render_train {
my ( $self, $result, $departure, $station_name, $template ) = @_;
+ $departure->{links} = [];
$departure->{route_pre_diff} = [
$self->json_route_diff(
[ $result->route_pre ],
@@ -609,6 +610,15 @@ sub render_train {
if ( $message->{display} ) {
push( @him_messages,
[ $message->{header}, $message->{lead} ] );
+ if ( $message->{lead} =~ m{zuginfo.nrw/?\?msg=(\d+)} ) {
+ push(
+ @{ $departure->{links} },
+ [
+ "Großstörung",
+ "https://zuginfo.nrw/?msg=$1"
+ ]
+ );
+ }
}
}
for my $message ( @{ $departure->{moreinfo} // [] } ) {