fsd
parent
231546f4a2
commit
7ca2b0ae33
|
@ -332,6 +332,10 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
|
|||
if sort == "hot":
|
||||
ti = int(time.time()) + 3600
|
||||
posts = posts.order_by(-1000000*(Submission.realupvotes + 1 + Submission.comment_count/5 + (func.length(Submission.body_html)-func.length(func.replace(Submission.body_html,'</a>',''))))/(func.power(((ti - Submission.created_utc)/1000), 1.23)))
|
||||
|
||||
if v and v.id == AEVANN_ID:
|
||||
for p in posts:
|
||||
print(-1000000*(p.realupvotes + 1 + p.comment_count/5 + (len(p.body_html)-len(p.body_html.replace('</a>',''))))/((ti - p.created_utc)/1000)**1.23, flush=True)
|
||||
elif sort == "bump":
|
||||
posts = posts.filter(Submission.comment_count > 1).order_by(Submission.bump_utc.desc())
|
||||
elif sort == "new":
|
||||
|
|
Loading…
Reference in New Issue