Filter banned subreddits from search results

This commit is contained in:
Keith Mitchell
2013-04-10 15:22:56 -07:00
parent fe1ce21109
commit 21f07e8c52

View File

@@ -583,6 +583,9 @@ class SearchBuilder(IDBuilder):
# TODO: Consider a flag to disable this (and see listingcontroller.py)
if item._spam or item._deleted:
return False
# If checking (wrapped) links, filter out banned subreddits
elif hasattr(item, 'subreddit') and item.subreddit.spammy():
return False
elif (self.skip_deleted_authors and
getattr(item, "author", None) and item.author._deleted):
return False