diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-20 21:39:30 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-20 21:39:30 +0100 |
commit | 63cef4c7d641ffddaeabcd768020674e2681ba05 (patch) | |
tree | 10b9ee50b927a7673d93db15b896a15a1012f482 /module/datatypes/PyFile.py | |
parent | added ReadWrite lock, render file progress on dashboard (diff) | |
download | pyload-63cef4c7d641ffddaeabcd768020674e2681ba05.tar.xz |
improved ui, render waiting files
Diffstat (limited to 'module/datatypes/PyFile.py')
-rw-r--r-- | module/datatypes/PyFile.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/module/datatypes/PyFile.py b/module/datatypes/PyFile.py index bd335a05a..5f2be8769 100644 --- a/module/datatypes/PyFile.py +++ b/module/datatypes/PyFile.py @@ -16,7 +16,7 @@ # @author: RaNaN ############################################################################### -from time import sleep +from time import sleep, time from ReadWriteLock import ReadWriteLock from module.Api import ProgressInfo, DownloadProgress, FileInfo, DownloadInfo, DownloadStatus @@ -229,8 +229,11 @@ class PyFile(object): return 0 def getETA(self): - """ gets established time of arrival""" + """ gets established time of arrival / or waiting time""" try: + if self.status == DownloadStatus.Waiting: + return self.waitUntil - time() + return self.getBytesLeft() / self.getSpeed() except: return 0 |