From 8008e505b4ef3d0ed5c853c0988ea18df9c7b01e Mon Sep 17 00:00:00 2001 From: Milan Date: Sat, 23 May 2020 23:34:29 +0200 Subject: [PATCH] calendar: show playout errors --- lib/calcms/audio.pm | 12 ++++++++++++ website/agenda/planung/calendar.cgi | 1 + 2 files changed, 13 insertions(+) diff --git a/lib/calcms/audio.pm b/lib/calcms/audio.pm index 1f7853c..5a84c88 100644 --- a/lib/calcms/audio.pm +++ b/lib/calcms/audio.pm @@ -100,5 +100,17 @@ sub formatLoudness { return qq{
$prefix$value dB
}; } +sub formatFile{ + my $file = shift; + my $event_id = shift; + + return '' unless $file; + + my ($id) = $file =~ /id(\d+)/; + return '' unless $id; + return '' if $id eq $event_id; + return qq{
Playout
}; +} + # do not delete this line 1; diff --git a/website/agenda/planung/calendar.cgi b/website/agenda/planung/calendar.cgi index 3f1137f..95c9eb3 100755 --- a/website/agenda/planung/calendar.cgi +++ b/website/agenda/planung/calendar.cgi @@ -1164,6 +1164,7 @@ sub printTableBody { if ( $event->{class} eq 'event' ) { $event->{content} .= '
'; + $event->{content} .= audio::formatFile($event->{file}, $event->{event_id}); $event->{content} .= audio::formatDuration( $event->{duration}, $event->{event_duration},