diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-05-19 12:56:09 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-05-19 12:56:09 (GMT) |
commit | 10e2d89361988bd25a7085a34a874c8bf8ce98b5 (patch) | |
tree | 42778c8028ae6db0ba75f5b7681ca90c19c25361 | |
parent | 7b7dd1ff6c06820ea84c7c03f1dbe6d0d57961cc (diff) |
add group name to show info
-rwxr-xr-x | lib/RHRD/rddb.pm | 5 | ||||
-rwxr-xr-x | utils/rhrd-show | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/RHRD/rddb.pm b/lib/RHRD/rddb.pm index 1286a46..36a4298 100755 --- a/lib/RHRD/rddb.pm +++ b/lib/RHRD/rddb.pm @@ -1298,7 +1298,7 @@ sub get_show_info { my ($ctx, $showid) = @_; - my $sql = qq{select SET_USER_DEFINED from DROPBOXES where STATION_NAME = ? and TO_CART = ?;}; + my $sql = qq{select GROUP_NAME,SET_USER_DEFINED from DROPBOXES where STATION_NAME = ? and TO_CART = ?;}; my $sth = $ctx->{'dbh'}->prepare($sql) or return (undef, 'ERROR', "Database Error: " . $ctx->{'dbh'}->errstr); @@ -1306,7 +1306,7 @@ sub get_show_info $sth->execute($ctx->{'config'}{'dropboxes'}{'dropbox-pseudo-station'}, $showid) or return (undef, 'ERROR', "Database Error: " . $sth->errstr); - my ($params) = $sth->fetchrow_array; + my ($group, $params) = $sth->fetchrow_array; $sth->finish(); my @p = split(';', $params); @@ -1317,6 +1317,7 @@ sub get_show_info my ($title, $log, $status, $errorstring) = get_show_title_and_log($ctx, $showid); return (undef, $status, $errorstring) unless (defined $title && defined $log); + $entry->{'GROUP'} = $group; $entry->{'TITLE'} = $title; $entry->{'LOG'} = $log; $entry->{'RHYTHM'} = $p[1]; diff --git a/utils/rhrd-show b/utils/rhrd-show index 731b627..0c81c72 100755 --- a/utils/rhrd-show +++ b/utils/rhrd-show @@ -65,7 +65,7 @@ sub show } $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"; + print " group: " . $show->{'GROUP'} . ", carts(" . scalar(@carts) . "): " . join(", ", @carts) . " \n"; return 0; } |