diff --git a/files/helpers/sorting_and_time.py b/files/helpers/sorting_and_time.py index 1e231ac30..f40835c12 100644 --- a/files/helpers/sorting_and_time.py +++ b/files/helpers/sorting_and_time.py @@ -29,6 +29,8 @@ def sort_comments(sort, comments): return comments.order_by((Comment.upvotes+1)/(Comment.downvotes+1) + (Comment.downvotes+1)/(Comment.upvotes+1), Comment.downvotes.desc(), Comment.id.desc()) elif sort == "bottom": return comments.order_by(Comment.upvotes - Comment.downvotes) + elif SITE == 'watchpeopledie.co': + return comments.order_by(Comment.downvotes - Comment.upvotes, Comment.id.desc()) else: return comments.order_by(Comment.realupvotes.desc(), Comment.id.desc()) diff --git a/files/routes/front.py b/files/routes/front.py index 957dc8eb0..e5a74d11a 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -119,7 +119,10 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false" if sort in ("hot","warm"): ti = int(time.time()) + 3600 - posts = posts.order_by(-1000000*(Submission.realupvotes + 1 + Submission.comment_count/num)/(func.power(((ti - Submission.created_utc)/1000), 1.23)), Submission.created_utc.desc()) + if SITE == 'watchpeopledie.co': + posts = posts.order_by(-1000000*(Submission.downvotes - Submission.upvotes + 1 + Submission.comment_count/num)/(func.power(((ti - Submission.created_utc)/1000), 1.23)), Submission.created_utc.desc()) + else: + posts = posts.order_by(-1000000*(Submission.realupvotes + 1 + Submission.comment_count/num)/(func.power(((ti - Submission.created_utc)/1000), 1.23)), Submission.created_utc.desc()) elif sort == "bump": posts = posts.filter(Submission.comment_count > 1).order_by(Submission.bump_utc.desc(), Submission.created_utc.desc()) else: