Allow to add new torrents to queue top

PR #18518.
Closes #11599.
This commit is contained in:
Vladimir Golovnev
2023-02-10 17:15:41 +03:00
committed by GitHub
parent 72ac92ec68
commit 5d4766edbe
14 changed files with 81 additions and 1 deletions

View File

@@ -65,6 +65,7 @@ WatchedFolderOptionsDialog::WatchedFolderOptionsDialog(
populateSavePaths();
const BitTorrent::AddTorrentParams &torrentParams = watchedFolderOptions.addTorrentParams;
m_ui->addToQueueTopCheckBox->setChecked(torrentParams.addToQueueTop.value_or(session->isAddTorrentToQueueTop()));
m_ui->startTorrentCheckBox->setChecked(!torrentParams.addPaused.value_or(session->isAddTorrentPaused()));
m_ui->skipCheckingCheckBox->setChecked(torrentParams.skipChecking);
m_ui->comboTTM->setCurrentIndex(torrentParams.useAutoTMM.value_or(!session->isAutoTMMDisabledByDefault()));
@@ -116,6 +117,7 @@ TorrentFilesWatcher::WatchedFolderOptions WatchedFolderOptionsDialog::watchedFol
}
params.useAutoTMM = useAutoTMM;
params.category = m_ui->categoryComboBox->currentText();
params.addToQueueTop = m_ui->addToQueueTopCheckBox->isChecked();
params.addPaused = !m_ui->startTorrentCheckBox->isChecked();
params.skipChecking = m_ui->skipCheckingCheckBox->isChecked();
params.contentLayout = static_cast<BitTorrent::TorrentContentLayout>(m_ui->contentLayoutComboBox->currentIndex());