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:
parent
81ea42a2a4
commit
55f7adb106
|
@ -55,8 +55,9 @@ public class AutomaticDownloadAlgorithm {
|
||||||
candidates.addAll(queue);
|
candidates.addAll(queue);
|
||||||
for (FeedItem newItem : newItems) {
|
for (FeedItem newItem : newItems) {
|
||||||
FeedPreferences feedPrefs = newItem.getFeed().getPreferences();
|
FeedPreferences feedPrefs = newItem.getFeed().getPreferences();
|
||||||
FeedFilter feedFilter = feedPrefs.getFilter();
|
if (feedPrefs.getAutoDownload()
|
||||||
if (!candidates.contains(newItem) && feedFilter.shouldAutoDownload(newItem)) {
|
&& !candidates.contains(newItem)
|
||||||
|
&& feedPrefs.getFilter().shouldAutoDownload(newItem)) {
|
||||||
candidates.add(newItem);
|
candidates.add(newItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue