summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-07-19 20:33:32 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-07-19 20:33:32 (GMT)
commit0fe33cdf893de7483ee22c33f397c1df8645dbee (patch)
tree883905601ddf5887830ba328282a876cb7e70d5b
parent79e69e365ae9442c35b5ed5ebf2b68901b700c85 (diff)
added support for music pools
-rwxr-xr-xlib/rddb.pm13
-rwxr-xr-xrh-bin/listdropboxes.cgi4
2 files changed, 9 insertions, 8 deletions
diff --git a/lib/rddb.pm b/lib/rddb.pm
index a5c1f20..c48add5 100755
--- a/lib/rddb.pm
+++ b/lib/rddb.pm
@@ -145,10 +145,10 @@ sub get_dropboxes
my $entry = {};
$entry->{'GROUP'} = $group;
$entry->{'GROUPDESC'} = $groupdesc;
- $entry->{'GROUPLOWCART'} = $lowcart;
- $entry->{'GROUPHIGHCART'} = $highcart;
- $entry->{'NORMLEVEL'} = $normlevel;
- $entry->{'TRIMLEVEL'} = $trimlevel;
+ $entry->{'GROUPLOWCART'} = int $lowcart;
+ $entry->{'GROUPHIGHCART'} = int $highcart;
+ $entry->{'NORMLEVEL'} = int $normlevel;
+ $entry->{'TRIMLEVEL'} = int $trimlevel;
$entry->{'PARAM'} = $params;
if($p[0] eq "S") {
$entry->{'TYPE'} = 'show';
@@ -170,8 +170,9 @@ sub get_dropboxes
} elsif($p[0] eq "J") {
$entry->{'TYPE'} = 'jingle';
$entry->{'JINGLETITLE'} = $groupdesc;
- $entry->{'JINGLECART'} = int $p[1];
- $entry->{'JINGLECARTDISABLED'} = int $p[2];
+ } elsif($p[0] eq "M") {
+ $entry->{'TYPE'} = 'musicpool';
+ $entry->{'MUSICPOOLTITLE'} = $groupdesc;
}
push @allowed_dbs, $entry;
diff --git a/rh-bin/listdropboxes.cgi b/rh-bin/listdropboxes.cgi
index bfdc925..69ade9f 100755
--- a/rh-bin/listdropboxes.cgi
+++ b/rh-bin/listdropboxes.cgi
@@ -85,8 +85,8 @@ if($responsecode != 200) {
print " <show-length>" . $href->{'SHOWLEN'} . "</show-length>\n";
} elsif($href->{'TYPE'} eq "jingle") {
print " <jingle-title>" . $href->{'JINGLETITLE'} . "</jingle-title>\n";
- print " <jingle-cart>" . $href->{'JINGLECART'} . "</jingle-cart>\n";
- print " <jingle-cartdisabled>" . $href->{'JINGLECARTDISABLED'} . "</jingle-cartdisabled>\n";
+ } elsif($href->{'TYPE'} eq "musicpool") {
+ print " <musicpool-title>" . $href->{'MUSICPOOLTITLE'} . "</musicpool-title>\n";
}
print " </dropbox>\n";
}