mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-08 06:00:59 -07:00
Allow to add root folder to torrent content
This commit is contained in:
parent
d4a51979bb
commit
1d5dc283fe
30 changed files with 452 additions and 172 deletions
|
@ -275,11 +275,9 @@ void AutomatedRssDownloader::updateRuleDefinitionBox()
|
|||
index = 2;
|
||||
m_ui->comboAddPaused->setCurrentIndex(index);
|
||||
index = 0;
|
||||
if (m_currentRule.createSubfolder() == TriStateBool::True)
|
||||
index = 1;
|
||||
else if (m_currentRule.createSubfolder() == TriStateBool::False)
|
||||
index = 2;
|
||||
m_ui->comboCreateSubfolder->setCurrentIndex(index);
|
||||
if (m_currentRule.torrentContentLayout())
|
||||
index = static_cast<int>(*m_currentRule.torrentContentLayout()) + 1;
|
||||
m_ui->comboContentLayout->setCurrentIndex(index);
|
||||
m_ui->spinIgnorePeriod->setValue(m_currentRule.ignoreDays());
|
||||
QDateTime dateTime = m_currentRule.lastMatch();
|
||||
QString lMatch;
|
||||
|
@ -320,8 +318,8 @@ void AutomatedRssDownloader::clearRuleDefinitionBox()
|
|||
m_ui->spinIgnorePeriod->setValue(0);
|
||||
m_ui->comboAddPaused->clearEditText();
|
||||
m_ui->comboAddPaused->setCurrentIndex(-1);
|
||||
m_ui->comboCreateSubfolder->clearEditText();
|
||||
m_ui->comboCreateSubfolder->setCurrentIndex(-1);
|
||||
m_ui->comboContentLayout->clearEditText();
|
||||
m_ui->comboContentLayout->setCurrentIndex(-1);
|
||||
updateFieldsToolTips(m_ui->checkRegex->isChecked());
|
||||
updateMustLineValidity();
|
||||
updateMustNotLineValidity();
|
||||
|
@ -355,12 +353,12 @@ void AutomatedRssDownloader::updateEditedRule()
|
|||
else if (m_ui->comboAddPaused->currentIndex() == 2)
|
||||
addPaused = TriStateBool::False;
|
||||
m_currentRule.setAddPaused(addPaused);
|
||||
TriStateBool createSubfolder; // Undefined by default
|
||||
if (m_ui->comboCreateSubfolder->currentIndex() == 1)
|
||||
createSubfolder = TriStateBool::True;
|
||||
else if (m_ui->comboCreateSubfolder->currentIndex() == 2)
|
||||
createSubfolder = TriStateBool::False;
|
||||
m_currentRule.setCreateSubfolder(createSubfolder);
|
||||
|
||||
boost::optional<BitTorrent::TorrentContentLayout> contentLayout;
|
||||
if (m_ui->comboContentLayout->currentIndex() > 0)
|
||||
contentLayout = static_cast<BitTorrent::TorrentContentLayout>(m_ui->comboContentLayout->currentIndex() - 1);
|
||||
m_currentRule.setTorrentContentLayout(contentLayout);
|
||||
|
||||
m_currentRule.setIgnoreDays(m_ui->spinIgnorePeriod->value());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue