summaryrefslogtreecommitdiff
path: root/utils/rhrd-show
diff options
context:
space:
mode:
Diffstat (limited to 'utils/rhrd-show')
-rwxr-xr-xutils/rhrd-show15
1 files changed, 8 insertions, 7 deletions
diff --git a/utils/rhrd-show b/utils/rhrd-show
index a25ceff..3cac649 100755
--- a/utils/rhrd-show
+++ b/utils/rhrd-show
@@ -23,6 +23,7 @@
use strict;
use RHRD::rddb;
use RHRD::utils;
+use Date::Calc;
sub print_usage
{
@@ -55,15 +56,14 @@ sub show
print STDERR "$carts[1]: $carts[2]\n";
return 1;
}
- my ($title, undef, $status, $errorstring) = RHRD::rddb::get_show_title_and_log($ctx, $show_id);
- unless (defined $title) {
+ my ($show, $status, $errorstring) = RHRD::rddb::get_show_info($ctx, $show_id);
+ unless (defined $show) {
print STDERR "$errorstring\n";
return 1;
}
- print $title . ":\n";
- for my $cart (@carts) {
- print " > " . $cart . "\n";
- }
+ $show->{'DOW'} = 7 if $show->{'DOW'} == 0;
+ print $show->{'TITLE'} . ": " . join(", ", $show->{'RHYTHM'}, Date::Calc::Day_of_Week_to_Text($show->{'DOW'}), $show->{'STARTTIME'}, ($show->{'LEN'} . " min")) . "\n";
+ print " carts(" . scalar(@carts) . "): " . join(", ", @carts) . " \n";
return 0;
}
@@ -96,7 +96,7 @@ sub add__check_arguments
return 1;
}
- ($result, $err, $hint) = RHRD::utils::dropbox_param_dow_ok($dow);
+ ($result, $err, $hint) = RHRD::utils::cmdline_dow($dow);
unless($result) {
print STDERR $err . "\n " . $hint . "\n";
return 1;
@@ -125,6 +125,7 @@ sub add
if($ret) {
return $ret;
}
+ ($dow, undef, undef) = RHRD::utils::cmdline_dow($dow);
print " * creating show: " . $title . " (" . $name . ") for group '" . $groupname . "'\n";