summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-06-04 15:50:41 +0200
committerGravatar spoob <spoob@gmx.de> 2009-06-04 15:50:41 +0200
commitca482403e0c30d5a79655f0c44d3dacfc86fd4dd (patch)
treef2a0afc563c962865b19f1c9918638f7dac512a7
parentremove links from txt + several improvments (diff)
downloadpyload-ca482403e0c30d5a79655f0c44d3dacfc86fd4dd.tar.xz
nicer time output
-rw-r--r--Core.py12
-rw-r--r--config2
-rw-r--r--locale/messages.pot46
3 files changed, 38 insertions, 22 deletions
diff --git a/Core.py b/Core.py
index e44ce7584..20fb915c4 100644
--- a/Core.py
+++ b/Core.py
@@ -185,15 +185,23 @@ class Core(object):
return list
+ def format_time(self, seconds):
+ seconds = int(seconds)
+ if seconds > 60:
+ hours, seconds = divmod(seconds, 3600)
+ minutes, seconds = divmod(seconds, 60)
+ return "%.2i:%.2i:%.2i" % (hours, minutes, seconds)
+ return _("%i seconds") % seconds
+
def _test_print_status(self):
if self.thread_list.py_downloading:
for pyfile in self.thread_list.py_downloading:
if pyfile.status.type == 'downloading':
print pyfile.status.filename + ": speed is", int(pyfile.status.get_speed()), "kb/s"
- print pyfile.status.filename + ": finished in", int(pyfile.status.get_ETA()), "seconds"
+ print pyfile.status.filename + ": finished in", self.format_time(pyfile.status.get_ETA())
elif pyfile.status.type == 'waiting':
- print pyfile.status.filename + ": wait", int(pyfile.status.waituntil - time.time()), "seconds"
+ print pyfile.status.filename + ": wait", self.format_time(pyfile.status.waituntil - time.time())
def start(self):
""" starts the machine
diff --git a/config b/config
index 082d5be2c..db42eac9c 100644
--- a/config
+++ b/config
@@ -1,6 +1,6 @@
[general]
#use de or en
-language: de
+language: en
download_folder = Downloads
link_file = links.txt
failed_file = failed_links.txt
diff --git a/locale/messages.pot b/locale/messages.pot
index 557ea88b7..03bbefd86 100644
--- a/locale/messages.pot
+++ b/locale/messages.pot
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2009-05-29 00:48+CEST\n"
+"POT-Creation-Date: 2009-06-04 15:33+CEST\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,46 +16,54 @@ msgstr ""
#: Core.py:59
-msgid "Downloadtime:"
+msgid "folder for logs"
msgstr ""
-#: Core.py:63
+#: Core.py:60
msgid "folder for downloads"
msgstr ""
-#: Core.py:64
-msgid "folder for logs"
+#: Core.py:61
+msgid "file for links"
msgstr ""
-#: Core.py:65
-msgid "file for links"
+#: Core.py:68
+msgid "Downloadtime: %s"
msgstr ""
-#: Core.py:100
+#: Core.py:96
msgid " added"
msgstr ""
-#: Core.py:101
+#: Core.py:97
msgid "created index of plugins"
msgstr ""
-#: Core.py:147
-msgid "new update on pyload.de.rw:"
+#: Core.py:119
+msgid "new update %s on pyload.org"
+msgstr ""
+
+#: Core.py:121
+msgid "newst version %s in use:"
+msgstr ""
+
+#: Core.py:123
+msgid "beta version %s in use:"
msgstr ""
-#: Core.py:149
-msgid "newst update in use:"
+#: Core.py:132
+msgid "%s created"
msgstr ""
-#: Core.py:151
-msgid "beta version in use:"
+#: Core.py:134
+msgid "could not create %s"
msgstr ""
-#: Core.py:160
-msgid "created"
+#: Core.py:194
+msgid "%i seconds"
msgstr ""
-#: Core.py:162
-msgid "could not create "
+#: Core.py:222
+msgid "Server Mode"
msgstr ""