From 63cef4c7d641ffddaeabcd768020674e2681ba05 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 20 Mar 2013 21:39:30 +0100 Subject: improved ui, render waiting files --- module/datatypes/PyFile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/datatypes/PyFile.py') 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 -- cgit v1.2.3