diff options
author | Othmar Gsenger <otti@wirdorange.org> | 2011-01-18 20:51:28 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@wirdorange.org> | 2011-01-18 20:51:28 +0000 |
commit | 46d7907920595fb8ae8fb4b637795e99eb1ead1d (patch) | |
tree | c0336499cbf9e0a07eb6db89fb796da0ee839112 | |
parent | added login via ip functionality (diff) |
added download speed in kb (lahme leitung ;()
-rwxr-xr-x | groups.pl | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |