|
|
@ -202,16 +202,16 @@ void DownloadThread::checkDownloadSize(qint64 bytesReceived, qint64 bytesTotal) |
|
|
|
if (!reply) return; |
|
|
|
if (!reply) return; |
|
|
|
if (bytesTotal > 0) { |
|
|
|
if (bytesTotal > 0) { |
|
|
|
// Total number of bytes is available
|
|
|
|
// Total number of bytes is available
|
|
|
|
if (bytesTotal > 1048576) { |
|
|
|
if (bytesTotal > 1048576*10) { |
|
|
|
// More than 1MB, this is probably not a torrent file, aborting...
|
|
|
|
// More than 10MB, this is probably not a torrent file, aborting...
|
|
|
|
reply->abort(); |
|
|
|
reply->abort(); |
|
|
|
reply->deleteLater(); |
|
|
|
reply->deleteLater(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
disconnect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(checkDownloadSize(qint64,qint64))); |
|
|
|
disconnect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(checkDownloadSize(qint64,qint64))); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (bytesReceived > 1048576) { |
|
|
|
if (bytesReceived > 1048576*10) { |
|
|
|
// More than 1MB, this is probably not a torrent file, aborting...
|
|
|
|
// More than 10MB, this is probably not a torrent file, aborting...
|
|
|
|
reply->abort(); |
|
|
|
reply->abort(); |
|
|
|
reply->deleteLater(); |
|
|
|
reply->deleteLater(); |
|
|
|
} |
|
|
|
} |
|
|
|