diff --git a/files/helpers/const.py b/files/helpers/const.py index 3297eec8d..90b00d62e 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -1604,6 +1604,15 @@ BOOSTED_SITES = { 'tattle.life', } +BOOSTED_HOLES = { + 'furry', + 'femboy', + 'anime', + 'gaybros', + 'againsthateholes', + 'masterbaiters', +} + IMAGE_FORMATS = ['png','gif','jpg','jpeg','webp'] VIDEO_FORMATS = ['mp4','webm','mov','avi','mkv','flv','m4v','3gp'] AUDIO_FORMATS = ['mp3','wav','ogg','aac','m4a','flac'] diff --git a/files/routes/votes.py b/files/routes/votes.py index 8f925539e..59ca89d0e 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -141,15 +141,19 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): if SITE_NAME == 'rDrama': 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 len(target.body) > 5000 or target.sub == 'masterbaiters')): - target.realupvotes *= 2 - elif cls == Submission and len(target.body) < 5000: - multipler = len(target.body)/5000 + 1 - target.realupvotes *= multipler - - if cls == Submission and target.sub and target.sub not in ('space', 'istory', 'dinos', 'furry', 'anime', 'slackernews', 'gaybros', 'againsthateholes', 'femboy', 'masterbaiters'): - target.realupvotes *= 0.7 + mul = 1 + if target.author.progressivestack: + mul = 2 + elif cls == Submission: + if target.domain.endswith('.win') or target.domain in BOOSTED_SITES or target.sub in BOOSTED_HOLES: + mul = 2 + elif target.sub: + mul = 0.7 + elif len(target.body) > 2000: + mul = 1 + len(target.body)/5000 + mul = min(mul, 2) + target.realupvotes *= mul g.db.add(target) return "", 204