From 7ca2b0ae3379c417ead5634c7a4f8ecbb0842c9f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 21 Mar 2022 23:41:40 +0200 Subject: [PATCH] fsd --- files/routes/front.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/routes/front.py b/files/routes/front.py index eeddbe185..66ec3faf3 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -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,'',''))))/(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('',''))))/((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":