forked from rDrama/rDrama
fsd
parent
6832b466b7
commit
cc55560a1d
|
@ -171,7 +171,8 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
|||
posts = posts.join(Submission.author).filter(User.shadowbanned == False)
|
||||
|
||||
if sort == "hot":
|
||||
posts = posts.order_by(-1*(Submission.upvotes - Submission.downvotes)/((Submission.created_utc)/1000))
|
||||
ti = int(time.time())
|
||||
posts = posts.order_by(-1*(Submission.upvotes - Submission.downvotes)/((ti - Submission.created_utc)/1000))
|
||||
elif sort == "new":
|
||||
posts = posts.order_by(Submission.created_utc.desc())
|
||||
elif sort == "old":
|
||||
|
|
Loading…
Reference in New Issue