]> git.sur5r.net Git - minitube/commitdiff
Buffering lasts at least 2 seconds
authorunknown <flavio@.(none)>
Sat, 22 Jan 2011 14:08:01 +0000 (15:08 +0100)
committerunknown <flavio@.(none)>
Sat, 22 Jan 2011 14:08:01 +0000 (15:08 +0100)
src/downloaditem.cpp

index dd5b278062592c4f30936e444bdc3e4c451b2d34..c5192e7ecb3fddc2c8f8508d4e1602fd7245b65f 100644 (file)
@@ -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();
     }