mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
- little optimization for torrentstopauseafterchecking
This commit is contained in:
@@ -269,11 +269,6 @@ bool bittorrent::pauseTorrent(QString hash) {
|
|||||||
paused_file.open(QIODevice::WriteOnly | QIODevice::Text);
|
paused_file.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||||
paused_file.close();
|
paused_file.close();
|
||||||
}
|
}
|
||||||
// Remove from the list of torrents to pause after checking
|
|
||||||
int index = torrentsToPauseAfterChecking.indexOf(hash);
|
|
||||||
if(index != -1) {
|
|
||||||
torrentsToPauseAfterChecking.removeAt(index);
|
|
||||||
}
|
|
||||||
return change;
|
return change;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1038,6 +1033,7 @@ void bittorrent::readAlerts() {
|
|||||||
qDebug("%s have just finished checking", hash.toUtf8().data());
|
qDebug("%s have just finished checking", hash.toUtf8().data());
|
||||||
int index = torrentsToPauseAfterChecking.indexOf(hash);
|
int index = torrentsToPauseAfterChecking.indexOf(hash);
|
||||||
if(index != -1) {
|
if(index != -1) {
|
||||||
|
torrentsToPauseAfterChecking.removeAt(index);
|
||||||
// Pause torrent
|
// Pause torrent
|
||||||
pauseTorrent(hash);
|
pauseTorrent(hash);
|
||||||
qDebug("%s was paused after checking", hash.toUtf8().data());
|
qDebug("%s was paused after checking", hash.toUtf8().data());
|
||||||
|
|||||||
Reference in New Issue
Block a user