Support overriding global "Add paused" option in RSS on per rule basis

This commit is contained in:
Nick Tiskov 2014-08-18 23:58:40 +04:00
parent 3b4548fe73
commit ef14b83134
7 changed files with 146 additions and 9 deletions

View file

@ -255,6 +255,7 @@ void AutomatedRssDownloader::updateRuleDefinitionBox()
} else {
ui->comboLabel->setCurrentIndex(ui->comboLabel->findText(rule->label()));
}
ui->comboAddPaused->setCurrentIndex(rule->addPaused());
ui->spinIgnorePeriod->setValue(rule->ignoreDays());
QDateTime dateTime = rule->lastMatch();
QString lMatch = tr("Last match: ");
@ -269,6 +270,7 @@ void AutomatedRssDownloader::updateRuleDefinitionBox()
// New rule
clearRuleDefinitionBox();
ui->lineContains->setText(selection.first()->text());
ui->comboAddPaused->setCurrentIndex(0);
}
updateFieldsToolTips(ui->checkRegex->isChecked());
// Enable
@ -339,6 +341,7 @@ void AutomatedRssDownloader::saveEditedRule()
else
rule->setSavePath("");
rule->setLabel(ui->comboLabel->currentText());
rule->setAddPaused(RssDownloadRule::AddPausedState(ui->comboAddPaused->currentIndex()));
// Save new label
if (!rule->label().isEmpty())
Preferences::instance()->addTorrentLabel(rule->label());