From cae7258b711b6f3e974ceb99624675d5bb6326a3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 22 Jan 2011 15:08:01 +0100 Subject: [PATCH] Buffering lasts at least 2 seconds --- src/downloaditem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/downloaditem.cpp b/src/downloaditem.cpp index dd5b278..c5192e7 100644 --- a/src/downloaditem.cpp +++ b/src/downloaditem.cpp @@ -160,9 +160,11 @@ void DownloadItem::downloadProgress(qint64 bytesReceived, qint64 bytesTotal) { } // qDebug() << bytesReceived << bytesTotal; + if (m_status != Downloading - && bytesReceived > 1024 * 512 - && bytesReceived > bytesTotal * .01) { + && bytesReceived > 1024 * 1024 + && bytesReceived > bytesTotal * .01 + && m_downloadTime.msecsTo(now) > 2000 ) { m_status = Downloading; emit statusChanged(); } -- 2.39.5