From 556b3e3c4e89db62f2c593aae02cf12cd9cfdc16 Mon Sep 17 00:00:00 2001 From: TLSM Date: Fri, 7 Oct 2022 21:13:57 -0400 Subject: [PATCH] PCM: don't rescale uploaded banners. --- files/routes/comments.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index df1a74439..4c9928afa 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -206,12 +206,13 @@ def comment(v): copyfile(oldname, filename) process_image(filename, resize=400) elif parent_post.id == BANNER_THREAD: + banner_width = 1200 if not SITE_NAME == 'PCM' else 0 li = sorted(os.listdir(f'files/assets/images/{SITE_NAME}/banners'), key=lambda e: int(e.split('.webp')[0]))[-1] num = int(li.split('.webp')[0]) + 1 filename = f'files/assets/images/{SITE_NAME}/banners/{num}.webp' copyfile(oldname, filename) - process_image(filename, resize=1200) + process_image(filename, resize=banner_width) elif parent_post.id == BADGE_THREAD: try: badge_def = loads(body)