forked from rDrama/rDrama
master
parent
efb7b1042a
commit
aa05420b8f
|
@ -157,9 +157,9 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
||||||
if lt:
|
if lt:
|
||||||
posts = posts.filter(Submission.created_utc < lt)
|
posts = posts.filter(Submission.created_utc < lt)
|
||||||
|
|
||||||
#if not (v and v.shadowbanned):
|
if not (v and v.shadowbanned):
|
||||||
posts=posts.join(Submission.author)
|
posts=posts.join(Submission.author)
|
||||||
posts=posts.filter(User.shadowbanned == False)
|
posts=posts.filter(User.shadowbanned == False)
|
||||||
|
|
||||||
if sort == "hot":
|
if sort == "hot":
|
||||||
posts = sorted(posts.all(), key=lambda x: x.hotscore, reverse=True)
|
posts = sorted(posts.all(), key=lambda x: x.hotscore, reverse=True)
|
||||||
|
@ -182,7 +182,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
||||||
abort(400)
|
abort(400)
|
||||||
|
|
||||||
firstrange = 50 * (page - 1)
|
firstrange = 50 * (page - 1)
|
||||||
secondrange = firstrange+200
|
secondrange = firstrange+51
|
||||||
posts = posts[firstrange:secondrange]
|
posts = posts[firstrange:secondrange]
|
||||||
|
|
||||||
if random.random() < 0.004:
|
if random.random() < 0.004:
|
||||||
|
|
Loading…
Reference in New Issue