summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@wirdorange.org>2011-01-18 20:51:28 +0000
committerOthmar Gsenger <otti@wirdorange.org>2011-01-18 20:51:28 +0000
commit46d7907920595fb8ae8fb4b637795e99eb1ead1d (patch)
treec0336499cbf9e0a07eb6db89fb796da0ee839112
parentadded login via ip functionality (diff)
added download speed in kb (lahme leitung ;()
-rwxr-xr-xgroups.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/groups.pl b/groups.pl
index 0cceceb..908b2d5 100755
--- a/groups.pl
+++ b/groups.pl
@@ -21,7 +21,8 @@ sub get_download_speed
{
my $cli = new local::nzbget;
my $status = $cli->send_request('status') or die "Can't connect to nzbget";
- return int($status->{DownloadRate}->value/(1024*1024)).'MB/s';
+ my $speed = int($status->{DownloadRate}->value/(1024*1024));
+ return $speed?$speed.'MB/s':int($status->{DownloadRate}->value/1024).'KB/s';
}
sub get_download_table