boost marked effortposts in the algo

master
Aevann 2024-02-08 01:28:43 +02:00
parent a44bf31afe
commit 5de7da515e
1 changed files with 3 additions and 0 deletions

View File

@ -181,6 +181,9 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
elif SITE == 'rdrama.net' and cls == Comment and 6 <= datetime.fromtimestamp(target.created_utc).hour <= 10:
mul = 2
if cls == Post and target.effortpost:
mul *= 2
target.realupvotes = floor(target.realupvotes * mul)
g.db.add(target)