summaryrefslogtreecommitdiff
path: root/groups.pl
diff options
context:
space:
mode:
Diffstat (limited to 'groups.pl')
-rwxr-xr-xgroups.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/groups.pl b/groups.pl
index 15291d2..cd7623c 100755
--- a/groups.pl
+++ b/groups.pl
@@ -6,6 +6,7 @@ use CGI::Carp 'fatalsToBrowser';
use local::nzbget;
use local::db;
use local::user;
+use utf8;
my $user = new local::user($ENV{REMOTE_USER});
use CGI::Ajax;
@@ -29,6 +30,7 @@ sub get_download_table
my $cli = new local::nzbget;
my $row = $cli->send_request('listgroups') or die "Can't connect to nzbget";
$html.= CGI::start_table();
+ $html.= Tr(th([qw/Kategorie Name Besitzer Größe(MB) Fortschritt Abbrechen/]));
foreach my $value ( @$row)
{
my ($download) = local::db::download->retrieve($value->{NZBNicename}->value) or die ' Error in groups';
@@ -39,10 +41,12 @@ sub get_download_table
{
$download->size($total);
$download->update();
+ $user->obj->quota_used($user->obj->quota_used+$total);
+ $user->obj->update();
}
my $cancel;
$cancel=a({href=>'/cgi-bin/nzbget/cancel.pl?id='.$value->{NZBNicename}->value},'Abbrechen') if ($download->owner->owner_id() eq $user->get_id());
- $html.= Tr(td([$download->category->name,$download->name,$download->owner->name,$percent.'%',$cancel]));
+ $html.= Tr(td([$download->category->name,$download->name,$download->owner->name,$total,$percent.'%',$cancel]));
#foreach my $key (keys %$value)
#{
# $html.= Tr(td([$key,$value->{$key}->value]));
@@ -64,8 +68,7 @@ sub Show_HTML
//--></script>
LALALA
;
- $html.= table({class=>'nohigh'},Tr(td['download speed', div({id=>'speed'},get_download_speed())]),Tr(td(['&nbsp;'])));
- $html.= table(Tr(th([qw/Kategorie Name Besitzer Fortschritt Abbrechen/])));
+ $html.= table({class=>'nohigh'},Tr(td['download speed &nbsp; '. span({id=>'speed'},get_download_speed())]),Tr(td(['&nbsp;'])));
$html.= div({id=>'dls'},get_download_table());
$html.= $menu->end_html();