mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Make "Ignoring days" to behave like other filters
This prevents confusing in GUI when it shows matched RSS articles which be really ignored by the rule.
This commit is contained in:
@@ -365,19 +365,7 @@ void AutoDownloader::processJob(const QSharedPointer<ProcessingJob> &job)
|
||||
for (AutoDownloadRule &rule: m_rules) {
|
||||
if (!rule.isEnabled()) continue;
|
||||
if (!rule.feedURLs().contains(job->feedURL)) continue;
|
||||
if (!rule.matches(job->articleData.value(Article::KeyTitle).toString())) continue;
|
||||
|
||||
auto articleDate = job->articleData.value(Article::KeyDate).toDateTime();
|
||||
// if rule is in ignoring state do nothing with matched torrent
|
||||
if (rule.ignoreDays() > 0) {
|
||||
if (rule.lastMatch().isValid()) {
|
||||
if (articleDate < rule.lastMatch().addDays(rule.ignoreDays()))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
rule.setLastMatch(articleDate);
|
||||
rule.appendLastComputedEpisode();
|
||||
if (!rule.accepts(job->articleData)) continue;
|
||||
|
||||
m_dirty = true;
|
||||
storeDeferred();
|
||||
|
||||
Reference in New Issue
Block a user