diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-07-31 12:12:14 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-07-31 12:12:14 (GMT) |
commit | 1283d78ec24c3b4e084409610e4711015044ce58 (patch) | |
tree | 00efc5edf30655d407961f06d22e1bb4606b7333 /utils/rhrd-pool | |
parent | 96b197680f423d4afda7c113a1049a656cc81abf (diff) |
print used carts for musicpools
Diffstat (limited to 'utils/rhrd-pool')
-rwxr-xr-x | utils/rhrd-pool | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/rhrd-pool b/utils/rhrd-pool index 1534af6..dc85f94 100755 --- a/utils/rhrd-pool +++ b/utils/rhrd-pool @@ -58,8 +58,14 @@ sub show print STDERR "$errorstring\n"; return 1; } + my @carts = RHRD::rddb::get_musicpool_carts_used($ctx, $shortname); + if(!defined $carts[0] && defined $carts[1]) { + print STDERR "$carts[1]: $carts[2]"; + return 1; + } + print $pool->{'TITLE'} . " (" . $pool->{'SHORTNAME'} . "):\n"; - print " group: " . $pool->{'GROUP'} . ", carts: " . $pool->{'LOW_CART'} . "-" . $pool->{'HIGH_CART'} . "\n"; # TODO print info about cart usage + print " group: " . $pool->{'GROUP'} . ", carts: " . $pool->{'LOW_CART'} . "-" . $pool->{'HIGH_CART'} . " (" . scalar(@carts) . " used)\n"; return 0; } |