diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-03-06 13:36:39 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-03-06 13:36:39 +0100 |
commit | 4df2b77fdf42046fe19bd371be7c7255986b5980 (patch) | |
tree | 2a7227a0d22e03dc2c085514eaab36a7e5e612c4 /module/web/json_app.py | |
parent | ssl fix (diff) | |
download | pyload-4df2b77fdf42046fe19bd371be7c7255986b5980.tar.xz |
renamed hooks to addons, new filemanager and database, many new api methods
you will loose ALL your LINKS, webinterface will NOT work
Diffstat (limited to 'module/web/json_app.py')
-rw-r--r-- | module/web/json_app.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/module/web/json_app.py b/module/web/json_app.py index 5acafe153..fcaa906e1 100644 --- a/module/web/json_app.py +++ b/module/web/json_app.py @@ -11,16 +11,7 @@ from webinterface import PYLOAD from utils import login_required, render_to_response, toDict -from module.utils import decode, formatSize - - -def format_time(seconds): - seconds = int(seconds) - - hours, seconds = divmod(seconds, 3600) - minutes, seconds = divmod(seconds, 60) - return "%.2i:%.2i:%.2i" % (hours, minutes, seconds) - +from module.utils import decode, format_size def get_sort_key(item): return item["order"] @@ -49,7 +40,7 @@ def links(): ids.append(link['fid']) if link['status'] == 12: - link['info'] = "%s @ %s/s" % (link['format_eta'], formatSize(link['speed'])) + link['info'] = "%s @ %s/s" % (link['format_eta'], format_size(link['speed'])) elif link['status'] == 5: link['percent'] = 0 link['size'] = 0 |