use site specific patron name

remotes/1693176582716663532/tmp_refs/heads/watchparty
justcool393 2022-10-12 03:45:45 -07:00
parent 7b3361cfb7
commit c67406b84b
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ def process_audio(file):
size = os.stat(name).st_size
if size > MAX_IMAGE_AUDIO_SIZE_MB_PATRON * 1024 * 1024 or not g.v.patron and size > MAX_IMAGE_AUDIO_SIZE_MB * 1024 * 1024:
os.remove(name)
abort(413, f"Max image/audio size is {MAX_IMAGE_AUDIO_SIZE_MB} MB ({MAX_IMAGE_AUDIO_SIZE_MB_PATRON} MB for paypigs)")
abort(413, f"Max image/audio size is {MAX_IMAGE_AUDIO_SIZE_MB} MB ({MAX_IMAGE_AUDIO_SIZE_MB_PATRON} MB for {patron.lower()}s)")
media = g.db.query(Media).filter_by(filename=name, kind='audio').one_or_none()
if media: g.db.delete(media)

View File

@ -313,7 +313,7 @@ def award_thing(v, thing_type, id):
else: author.progressivestack = int(time.time()) + 21600
badge_grant(user=author, badge_id=94)
elif kind == "benefactor":
if author.patron: abort(400, "This user is already a paypig!")
if author.patron: abort(409, f"This user is already a {patron.lower()}!")
author.patron = 1
if author.patron_utc: author.patron_utc += 2629746
else: author.patron_utc = int(time.time()) + 2629746