mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 16:58:06 -06:00
Merge pull request #8945 from glassez/rss-rule
Improve code of RSS auto-downloading rule. Closes #8933
This commit is contained in:
@@ -114,6 +114,8 @@ AutomatedRssDownloader::AutomatedRssDownloader(QWidget *parent)
|
||||
connect(m_ui->checkRegex, &QCheckBox::stateChanged, this, &AutomatedRssDownloader::updateMustLineValidity);
|
||||
connect(m_ui->checkRegex, &QCheckBox::stateChanged, this, &AutomatedRssDownloader::updateMustNotLineValidity);
|
||||
connect(m_ui->checkSmart, &QCheckBox::stateChanged, this, &AutomatedRssDownloader::handleRuleDefinitionChanged);
|
||||
connect(m_ui->spinIgnorePeriod, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged)
|
||||
, this, &AutomatedRssDownloader::handleRuleDefinitionChanged);
|
||||
|
||||
connect(m_ui->listFeeds, &QListWidget::itemChanged, this, &AutomatedRssDownloader::handleFeedCheckStateChange);
|
||||
|
||||
@@ -581,7 +583,7 @@ void AutomatedRssDownloader::updateMatchingArticles()
|
||||
|
||||
QStringList matchingArticles;
|
||||
foreach (auto article, feed->articles())
|
||||
if (rule.matches(article->title()))
|
||||
if (rule.matches(article->data()))
|
||||
matchingArticles << article->title();
|
||||
if (!matchingArticles.isEmpty())
|
||||
addFeedArticlesToTree(feed, matchingArticles);
|
||||
|
||||
@@ -106,17 +106,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkSmart">
|
||||
<property name="toolTip">
|
||||
<string>Smart Episode Filter will check the episode number to prevent downloading of duplicates.
|
||||
Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also support - as a separator)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use Smart Episode Filter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
@@ -191,6 +180,17 @@ Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkSmart">
|
||||
<property name="toolTip">
|
||||
<string>Smart Episode Filter will check the episode number to prevent downloading of duplicates.
|
||||
Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also support - as a separator)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use Smart Episode Filter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
|
||||
Reference in New Issue
Block a user