hide /h/selfharm and /h/pets for logged-out-cels on the frontpage on non-hot sorts

master
Aevann 2023-09-11 20:32:46 +03:00
parent 5a2d87b74b
commit 4e42ebb650
1 changed files with 3 additions and 0 deletions

View File

@ -145,6 +145,9 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
to_remove += [x.id for x in posts if x.sub == h][1:]
posts = [x for x in posts if x.id not in to_remove][:size]
elif SITE_NAME == 'WPD' and not v and sub == None:
posts = posts.limit(200).all()
posts = [x for x in posts if x.sub not in {'pets','selfharm'}][:size]
else:
posts = posts.limit(size).all()