summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-09-16 14:00:17 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-09-16 14:00:17 (GMT)
commit9f63561b4a02fffb49354966d9d411af57032011 (patch)
tree34213acd97e1cdce9b070ae1bce8c4e57af8ff35 /lib
parent143d3bc4a33ae634b0db2a5c838495a7645ca814 (diff)
creating pool clock now contains jingle events
Diffstat (limited to 'lib')
-rwxr-xr-xlib/RHRD/rddb.pm11
1 files changed, 9 insertions, 2 deletions
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;
}
}