mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
- little optimization for torrentstopauseafterchecking
This commit is contained in:
parent
57309c7d82
commit
bd84cb197f
1 changed files with 1 additions and 5 deletions
|
@ -269,11 +269,6 @@ bool bittorrent::pauseTorrent(QString hash) {
|
|||
paused_file.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -1038,6 +1033,7 @@ void bittorrent::readAlerts() {
|
|||
qDebug("%s have just finished checking", hash.toUtf8().data());
|
||||
int index = torrentsToPauseAfterChecking.indexOf(hash);
|
||||
if(index != -1) {
|
||||
torrentsToPauseAfterChecking.removeAt(index);
|
||||
// Pause torrent
|
||||
pauseTorrent(hash);
|
||||
qDebug("%s was paused after checking", hash.toUtf8().data());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue