mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 09:13:08 -07:00
Merge pull request #7475 from thalieht/ratiosuperseed
Add option to enable Super Seeding mode once ratio/time limit is reached. Closes #7160.
This commit is contained in:
commit
767f024585
4 changed files with 18 additions and 9 deletions
|
@ -1535,10 +1535,14 @@ void Session::processShareLimits()
|
|||
LogMsg(tr("'%1' reached the maximum ratio you set. Removed.").arg(torrent->name()));
|
||||
deleteTorrent(torrent->hash());
|
||||
}
|
||||
else if (!torrent->isPaused()) {
|
||||
else if ((m_maxRatioAction == Pause) && !torrent->isPaused()) {
|
||||
torrent->pause();
|
||||
LogMsg(tr("'%1' reached the maximum ratio you set. Paused.").arg(torrent->name()));
|
||||
}
|
||||
else if ((m_maxRatioAction == EnableSuperSeeding) && !torrent->isPaused() && !torrent->superSeeding()) {
|
||||
torrent->setSuperSeeding(true);
|
||||
LogMsg(tr("'%1' reached the maximum ratio you set. Enabled super seeding for it.").arg(torrent->name()));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -1558,10 +1562,14 @@ void Session::processShareLimits()
|
|||
LogMsg(tr("'%1' reached the maximum seeding time you set. Removed.").arg(torrent->name()));
|
||||
deleteTorrent(torrent->hash());
|
||||
}
|
||||
else if (!torrent->isPaused()) {
|
||||
else if ((m_maxRatioAction == Pause) && !torrent->isPaused()) {
|
||||
torrent->pause();
|
||||
LogMsg(tr("'%1' reached the maximum seeding time you set. Paused.").arg(torrent->name()));
|
||||
}
|
||||
else if ((m_maxRatioAction == EnableSuperSeeding) && !torrent->isPaused() && !torrent->superSeeding()) {
|
||||
torrent->setSuperSeeding(true);
|
||||
LogMsg(tr("'%1' reached the maximum seeding time you set. Enabled super seeding for it.").arg(torrent->name()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue