diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-07-29 17:05:45 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-07-29 17:05:45 +0200 |
commit | 252cf9964a2ebc78a589f75db2a7be0d25cac512 (patch) | |
tree | 0f4cd1a7949f8a3dc87eaed35f248170ee421943 /pyLoadCli.py | |
parent | many new stuff, some things already working (diff) | |
download | pyload-252cf9964a2ebc78a589f75db2a7be0d25cac512.tar.xz |
more improvements and cleaned some imports
Diffstat (limited to 'pyLoadCli.py')
-rwxr-xr-x | pyLoadCli.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/pyLoadCli.py b/pyLoadCli.py index bbe126a3d..cecac282b 100755 --- a/pyLoadCli.py +++ b/pyLoadCli.py @@ -22,12 +22,7 @@ from getopt import getopt import gettext import os import os.path -from os.path import abspath -from os.path import dirname from os.path import join -from os.path import exists -from os.path import expanduser -from os import name as platform import sys from sys import exit import threading @@ -112,7 +107,7 @@ class pyLoadCli: return "%.2i:%.2i:%.2i" % (hours, minutes, seconds) def format_size(self, size): - return conv(size / 1024) + " MiB" + return conv(size / 1024 ** 2) + " MiB" def println(self, line, content): print "\033[" + conv(line) + ";0H\033[2K" + conv(content) + "\033[" + conv((self.inputline if self.inputline > 0 else self.inputline + 1) - 1) + ";0H" @@ -135,7 +130,7 @@ class pyLoadCli: line = 4 speed = 0 for download in data: - if download["status"] == "downloading": + if download["status"] == 12: # downloading percent = download["percent"] z = percent / 4 speed += download['speed'] |