increase postdropoff and constantize LNTERNETCUSTODIAN_ID
parent
d40446075d
commit
86ee28d024
|
@ -659,6 +659,7 @@ TGTW_ID = 0
|
|||
IDIO_ID = 0
|
||||
SCHIZO_ID = 0
|
||||
SNALLY_ID = 0
|
||||
LNTERNETCUSTODIAN_ID = 0
|
||||
|
||||
IMMUNE_TO_AWARDS = {}
|
||||
|
||||
|
@ -762,6 +763,7 @@ if SITE == 'rdrama.net':
|
|||
IDIO_ID = 30
|
||||
SCHIZO_ID = 8494
|
||||
SNALLY_ID = 3336
|
||||
LNTERNETCUSTODIAN_ID = 8768
|
||||
|
||||
IMMUNE_TO_AWARDS = {PIZZASHILL_ID, CARP_ID}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ def sort_objects(sort, objects, cls):
|
|||
ti = int(time.time()) + 3600
|
||||
metric = cls.realupvotes
|
||||
if cls.__name__ == "Submission": metric += cls.comment_count/5
|
||||
return objects.order_by(-1000000*(metric + 1)/(func.power(((ti - cls.created_utc)/1000), 1.23)), cls.created_utc.desc())
|
||||
return objects.order_by(-1000000*(metric + 1)/(func.power(((ti - cls.created_utc)/1000), 1.5)), cls.created_utc.desc())
|
||||
elif sort == "views" and cls.__name__ == "Submission":
|
||||
return objects.order_by(cls.views.desc(), cls.created_utc.desc())
|
||||
elif sort == "bump" and cls.__name__ == "Submission":
|
||||
|
|
|
@ -169,10 +169,12 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
|
|||
mul = 2
|
||||
elif SITE == 'rdrama.net' and cls == Submission:
|
||||
if (target.domain.endswith('.win') or 'forum' in target.domain or 'chan' in target.domain
|
||||
or (target.domain in BOOSTED_SITES and not target.url.startswith('/'))
|
||||
or target.sub in BOOSTED_HOLES):
|
||||
or (target.domain in BOOSTED_SITES and not target.url.startswith('/'))):
|
||||
mul = 2
|
||||
if target.body_html and target.author.id != 8768:
|
||||
elif target.sub in BOOSTED_HOLES:
|
||||
mul = 1.25
|
||||
|
||||
if target.body_html and target.author.id != LNTERNETCUSTODIAN_ID:
|
||||
x = target.body_html.count('" target="_blank" rel="nofollow noopener">')
|
||||
x += target.body_html.count('" rel="nofollow noopener" target="_blank">')
|
||||
target.realupvotes += min(x*2, 20)
|
||||
|
|
Loading…
Reference in New Issue