Check Auto Download preference on the feed before auto downloading

AutoDownlaoding previously assumed that the filters had been initialised, which is not necessarily the case now that users can disable "Include in Auto Downloads" before subscribing to a new feed.
This commit is contained in:
Thom Merrilin 2021-01-03 16:53:20 +00:00 committed by ByteHamster
parent 81ea42a2a4
commit 55f7adb106
1 changed files with 3 additions and 2 deletions

View File

@ -55,8 +55,9 @@ public class AutomaticDownloadAlgorithm {
candidates.addAll(queue);
for (FeedItem newItem : newItems) {
FeedPreferences feedPrefs = newItem.getFeed().getPreferences();
FeedFilter feedFilter = feedPrefs.getFilter();
if (!candidates.contains(newItem) && feedFilter.shouldAutoDownload(newItem)) {
if (feedPrefs.getAutoDownload()
&& !candidates.contains(newItem)
&& feedPrefs.getFilter().shouldAutoDownload(newItem)) {
candidates.add(newItem);
}
}