diff options
Diffstat (limited to 'groups.pl')
-rwxr-xr-x | groups.pl | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -19,7 +19,7 @@ print $pjx->build_html( $cgi, \&Show_HTML); sub get_download_speed { my $cli = new local::nzbget; - my $status = $cli->send_request('status') or die "Can't connect to nubget"; + my $status = $cli->send_request('status') or die "Can't connect to nzbget"; return int($status->{DownloadRate}->value/(1024*1024)).'MB/s'; } @@ -27,7 +27,7 @@ sub get_download_table { my $html; my $cli = new local::nzbget; - my $row = $cli->send_request('listgroups') or die "Can't connect to nubget"; + my $row = $cli->send_request('listgroups') or die "Can't connect to nzbget"; $html.= CGI::start_table(); foreach my $value ( @$row) { @@ -35,8 +35,11 @@ sub get_download_table my $remaining=$value->{RemainingSizeMB}->value; my $total=$value->{FileSizeMB}->value; my $percent = int(100-100*$remaining/$total); - $download->size($total); - $download->update(); + if (not $download->size) + { + $download->size($total); + $download->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])); @@ -61,12 +64,8 @@ sub Show_HTML //--></script> LALALA ; - $html.= hr(); - $html.= CGI::start_table(); - $html.= Tr(td['download speed', div({id=>'speed'},get_download_speed())]); - $html.= CGI::end_table(); - $html.= hr(); - + $html.= table({class=>'nohigh'},Tr(td['download speed', div({id=>'speed'},get_download_speed())]),Tr(td([' ']))); + $html.= table(Tr(th([qw/Kategorie Name Besitzer Fortschritt Abbrechen/]))); $html.= div({id=>'dls'},get_download_table()); $html.= $menu->end_html(); |