mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 12:34:19 +00:00
- Another bug fix for upload queueing
This commit is contained in:
parent
5a61b7543b
commit
1acd05794a
@ -73,6 +73,9 @@ bittorrent::bittorrent() : timerScan(0), DHTEnabled(false), preAllocateAll(false
|
|||||||
BigRatioTimer = 0;
|
BigRatioTimer = 0;
|
||||||
filterParser = 0;
|
filterParser = 0;
|
||||||
downloadQueue = 0;
|
downloadQueue = 0;
|
||||||
|
queuedDownloads = 0;
|
||||||
|
uploadQueue = 0;
|
||||||
|
queuedUploads = 0;
|
||||||
qDebug("* BTSession constructed");
|
qDebug("* BTSession constructed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,6 +345,7 @@ int bittorrent::getDlTorrentPriority(QString hash) const {
|
|||||||
|
|
||||||
int bittorrent::getUpTorrentPriority(QString hash) const {
|
int bittorrent::getUpTorrentPriority(QString hash) const {
|
||||||
Q_ASSERT(uploadQueue != 0);
|
Q_ASSERT(uploadQueue != 0);
|
||||||
|
qDebug("priority: %d", uploadQueue->indexOf(hash));
|
||||||
return uploadQueue->indexOf(hash);
|
return uploadQueue->indexOf(hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,7 +653,7 @@ void bittorrent::setFinishedTorrent(QString hash) {
|
|||||||
// Remove it from TorrentsStartTime hash table
|
// Remove it from TorrentsStartTime hash table
|
||||||
TorrentsStartTime.remove(hash);
|
TorrentsStartTime.remove(hash);
|
||||||
TorrentsStartData.remove(hash);
|
TorrentsStartData.remove(hash);
|
||||||
// Remove it from downloadQueue
|
// Remove it from
|
||||||
if(queueingEnabled) {
|
if(queueingEnabled) {
|
||||||
downloadQueue->removeAll(hash);
|
downloadQueue->removeAll(hash);
|
||||||
queuedDownloads->removeAll(hash);
|
queuedDownloads->removeAll(hash);
|
||||||
@ -658,9 +662,11 @@ void bittorrent::setFinishedTorrent(QString hash) {
|
|||||||
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued"))
|
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued"))
|
||||||
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued");
|
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued");
|
||||||
updateDownloadQueue();
|
updateDownloadQueue();
|
||||||
|
if(!uploadQueue->contains(hash)) {
|
||||||
uploadQueue->append(hash);
|
uploadQueue->append(hash);
|
||||||
updateUploadQueue();
|
updateUploadQueue();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Save fast resume data
|
// Save fast resume data
|
||||||
saveFastResumeAndRatioData(hash);
|
saveFastResumeAndRatioData(hash);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user