remotes/1693045480750635534/spooky-22
Aevann1 2021-08-27 23:26:58 +02:00
parent ad95483303
commit 5663c7eb40
1 changed files with 3 additions and 3 deletions

View File

@ -144,13 +144,11 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
abort(400)
firstrange = 50 * (page - 1)
secondrange = firstrange+1000
secondrange = firstrange+200
posts = posts[firstrange:secondrange]
if v and v.hidevotedon: posts = [x for x in posts if not (hasattr(x, 'voted') and x.voted != 0)]
if page == 1: posts = g.db.query(Submission).filter_by(stickied=True).all() + posts
words = ['captainmeta4', ' cm4 ', 'dissident001', 'ladine']
for post in posts:
@ -181,6 +179,8 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
posts = posts[:50]
if page == 1: posts = g.db.query(Submission).filter_by(stickied=True).all() + posts
if ids_only: posts = [x.id for x in posts]
return posts, next_exists