mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 15:32:48 -07:00
Add "Remove torrent and its files" option to share ratio limiting
This commit is contained in:
parent
19c70fd659
commit
07eb261991
7 changed files with 97 additions and 39 deletions
|
@ -747,7 +747,14 @@ void OptionsDialog::saveOptions()
|
|||
session->setAdditionalTrackers(m_ui->textTrackers->toPlainText());
|
||||
session->setGlobalMaxRatio(getMaxRatio());
|
||||
session->setGlobalMaxSeedingMinutes(getMaxSeedingMinutes());
|
||||
session->setMaxRatioAction(static_cast<MaxRatioAction>(m_ui->comboRatioLimitAct->currentIndex()));
|
||||
|
||||
const QVector<MaxRatioAction> actIndex = {
|
||||
Pause,
|
||||
Remove,
|
||||
DeleteFiles,
|
||||
EnableSuperSeeding
|
||||
};
|
||||
session->setMaxRatioAction(actIndex.value(m_ui->comboRatioLimitAct->currentIndex()));
|
||||
// End Bittorrent preferences
|
||||
|
||||
// Misc preferences
|
||||
|
@ -1130,7 +1137,14 @@ void OptionsDialog::loadOptions()
|
|||
m_ui->spinMaxSeedingMinutes->setEnabled(false);
|
||||
}
|
||||
m_ui->comboRatioLimitAct->setEnabled((session->globalMaxSeedingMinutes() >= 0) || (session->globalMaxRatio() >= 0.));
|
||||
m_ui->comboRatioLimitAct->setCurrentIndex(session->maxRatioAction());
|
||||
|
||||
const QHash<MaxRatioAction, int> actIndex = {
|
||||
{Pause, 0},
|
||||
{Remove, 1},
|
||||
{DeleteFiles, 2},
|
||||
{EnableSuperSeeding, 3}
|
||||
};
|
||||
m_ui->comboRatioLimitAct->setCurrentIndex(actIndex.value(session->maxRatioAction()));
|
||||
// End Bittorrent preferences
|
||||
|
||||
// Web UI preferences
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue