From b526f6cc21ab1160540add629010d204effc7465 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 7 Nov 2022 03:35:46 +0200 Subject: [PATCH] apply the realupvotes manipulation logic in rdrama only, since its the only site that uses realupvotes anyway --- files/routes/votes.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/files/routes/votes.py b/files/routes/votes.py index db3c0ff0c2..d1ec82c573 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -137,13 +137,15 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): target.upvotes = get_vote_count(1, False) target.downvotes = get_vote_count(-1, False) - target.realupvotes = get_vote_count(0, True) # first arg is ignored here - if target.author.progressivestack or (cls == Submission and (target.domain.endswith('.win') or target.domain in BOOSTED_SITES)) or (cls == Submission and not target.sub and len(target.body) > 5000): - target.realupvotes *= 2 + if SITE_NAME == 'rDrama': + target.realupvotes = get_vote_count(0, True) # first arg is ignored here - if cls == Submission and target.sub and target.sub not in ('space', 'istory', 'dinos', 'furry', 'anime', 'slackernews', 'gaybros', 'againsthateholes', 'femboy'): - target.realupvotes = int(target.realupvotes * 0.7) + if target.author.progressivestack or (cls == Submission and (target.domain.endswith('.win') or target.domain in BOOSTED_SITES)) or (cls == Submission and not target.sub and len(target.body) > 5000): + target.realupvotes *= 2 + + if cls == Submission and target.sub and target.sub not in ('space', 'istory', 'dinos', 'furry', 'anime', 'slackernews', 'gaybros', 'againsthateholes', 'femboy'): + target.realupvotes = int(target.realupvotes * 0.7) g.db.add(target) return "", 204