stacked changes
parent
bee7cc8892
commit
5c4e0a5b79
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
|
@ -351,17 +351,17 @@ class Submission(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def is_video(self):
|
def is_video(self):
|
||||||
return self.url and any((self.url.lower().split('?')[0].endswith(f'.{x}') for x in VIDEO_FORMATS)) and is_safe_url(self.url)
|
return self.url and any((str(self.url).lower().split('?')[0].endswith(f'.{x}') for x in VIDEO_FORMATS)) and is_safe_url(self.url)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def is_audio(self):
|
def is_audio(self):
|
||||||
return self.url and any((self.url.lower().split('?')[0].endswith(f'.{x}') for x in AUDIO_FORMATS)) and is_safe_url(self.url)
|
return self.url and any((str(self.url).lower().split('?')[0].endswith(f'.{x}') for x in AUDIO_FORMATS)) and is_safe_url(self.url)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def is_image(self):
|
def is_image(self):
|
||||||
return self.url and any((self.url.lower().split('?')[0].endswith(f'.{x}') for x in IMAGE_FORMATS)) and is_safe_url(self.url)
|
return self.url and any((str(self.url).lower().split('?')[0].endswith(f'.{x}') for x in IMAGE_FORMATS)) and is_safe_url(self.url)
|
||||||
|
|
||||||
@lazy
|
@lazy
|
||||||
def filtered_flags(self, v):
|
def filtered_flags(self, v):
|
||||||
|
|
|
@ -588,6 +588,8 @@ def submit_post(v:User, sub=None):
|
||||||
if url and url.startswith(SITE_FULL):
|
if url and url.startswith(SITE_FULL):
|
||||||
url = url.split(SITE_FULL)[1]
|
url = url.split(SITE_FULL)[1]
|
||||||
|
|
||||||
|
if url == '': url = None
|
||||||
|
|
||||||
p = Submission(
|
p = Submission(
|
||||||
private=flag_private,
|
private=flag_private,
|
||||||
notify=flag_notify,
|
notify=flag_notify,
|
||||||
|
|
|
@ -1329,7 +1329,7 @@ def claim_rewards(v):
|
||||||
if transaction.amount < money: break
|
if transaction.amount < money: break
|
||||||
tier = t
|
tier = t
|
||||||
|
|
||||||
marseybux += TIER_TO_MARSEYBUX[tier]
|
marseybux += TIER_TO_MBUX[tier]
|
||||||
if tier > highest_tier:
|
if tier > highest_tier:
|
||||||
highest_tier = tier
|
highest_tier = tier
|
||||||
transaction.claimed = True
|
transaction.claimed = True
|
||||||
|
|
|
@ -164,7 +164,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
|
||||||
mul = 1
|
mul = 1
|
||||||
if target.is_approved == PROGSTACK_ID:
|
if target.is_approved == PROGSTACK_ID:
|
||||||
mul = PROGSTACK_MUL
|
mul = PROGSTACK_MUL
|
||||||
elif cls == Submission and (any(i in target.title.lower() for i in ENCOURAGED) or any(i in target.url.lower() for i in ENCOURAGED2)):
|
elif cls == Submission and (any(i in target.title.lower() for i in ENCOURAGED) or any(i in str(target.url).lower() for i in ENCOURAGED2)):
|
||||||
mul = PROGSTACK_MUL
|
mul = PROGSTACK_MUL
|
||||||
send_notification(AEVANN_ID, target.permalink)
|
send_notification(AEVANN_ID, target.permalink)
|
||||||
elif target.author.progressivestack or (target.author.admin_level and target.author.id not in {CARP_ID, SCHIZO_ID}):
|
elif target.author.progressivestack or (target.author.admin_level and target.author.id not in {CARP_ID, SCHIZO_ID}):
|
||||||
|
|
3987
seed-db.sql
3987
seed-db.sql
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue