From 0fe33cdf893de7483ee22c33f397c1df8645dbee Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 19 Jul 2015 22:33:32 +0200 Subject: added support for music pools 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 " " . $href->{'SHOWLEN'} . "\n"; } elsif($href->{'TYPE'} eq "jingle") { print " " . $href->{'JINGLETITLE'} . "\n"; - print " " . $href->{'JINGLECART'} . "\n"; - print " " . $href->{'JINGLECARTDISABLED'} . "\n"; + } elsif($href->{'TYPE'} eq "musicpool") { + print " " . $href->{'MUSICPOOLTITLE'} . "\n"; } print " \n"; } -- cgit v0.10.2