tweak rdrama algo
parent
5a10b849f8
commit
c8b4947fa4
|
@ -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']
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue