From 9f63561b4a02fffb49354966d9d411af57032011 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 16 Sep 2016 16:00:17 +0200 Subject: creating pool clock now contains jingle events diff --git a/lib/RHRD/rddb.pm b/lib/RHRD/rddb.pm index 5c7c26d..f89682a 100755 --- a/lib/RHRD/rddb.pm +++ b/lib/RHRD/rddb.pm @@ -72,6 +72,9 @@ sub init @{$ctx{'config'}{'shows'}{'logprefix'}} = split(' ', $cfg->val('shows', 'logprefix', '')); @{$ctx{'config'}{'shows'}{'logsuffix'}} = split(' ', $cfg->val('shows', 'logsuffix', '')); + $ctx{'config'}{'jingles'}{'event-regular'} = $cfg->val('jingles', 'event-regular', 'Jal'); + $ctx{'config'}{'jingles'}{'event-annouce'} = $cfg->val('jingles', 'event-announce', 'Jan'); + my ($dbh, $status, $errorstring) = opendb(); unless(defined $dbh) { return ($dbh, $status, $errorstring); @@ -2435,8 +2438,12 @@ sub create_musicpool_clock for(my $i=0; $i < 24; $i++) { push @events, { NAME => $shortname, START_TIME => $t, LENGTH => 142500 }; $t += 142500; - if($i > 0 && ($i % 8) == 0) { - # TODO: push jingle event + if($i > 0 && (($i+1) % 8) == 0) { + if($i == 23) { + push @events, { NAME => $ctx->{'config'}{'jingles'}{'event-annouce'}, START_TIME => $t, LENGTH => 60000 }; + } else { + push @events, { NAME => $ctx->{'config'}{'jingles'}{'event-regular'}, START_TIME => $t, LENGTH => 60000 }; + } $t += 60000; } } -- cgit v0.10.2