mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 03:28:41 -07: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:
parent
256f6954c5
commit
844f76c2ca
4 changed files with 28 additions and 26 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue