diff --git a/files/routes/comments.py b/files/routes/comments.py index 39bea7bb5..f1118960b 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -222,17 +222,17 @@ def api_comment(v): if image == "": return {"error":"Image upload failed"} if v.admin_level > 2 and level == 1: if parent_post.id == 37696: - li = sorted(os.listdir('files/assets/images/rDrama/sidebar'), + li = sorted(os.listdir(f'files/assets/images/{SITE_NAME}/sidebar'), key=lambda e: int(e.split('.webp')[0]))[-1] num = int(li.split('.webp')[0]) + 1 - filename = f'files/assets/images/rDrama/sidebar/{num}.webp' + filename = f'files/assets/images/{SITE_NAME}/sidebar/{num}.webp' copyfile(oldname, filename) process_image(v.patron, filename, 400) elif parent_post.id == 37697: - li = sorted(os.listdir('files/assets/images/rDrama/banners'), + 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/rDrama/banners/{num}.webp' + filename = f'files/assets/images/{SITE_NAME}/banners/{num}.webp' copyfile(oldname, filename) process_image(v.patron, filename) elif parent_post.id == 37833: @@ -1083,4 +1083,4 @@ def handle_wordle_action(cid, v): g.db.add(comment) g.db.commit() - return {"response" : comment.wordle_html(v)} \ No newline at end of file + return {"response" : comment.wordle_html(v)} diff --git a/files/templates/default.html b/files/templates/default.html index 3f93c4bfb..dcfed20bb 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -260,9 +260,9 @@ {% if v and (v.is_banned or v.agendaposter) %} - + {% else %} - + {% endif %} {% else %} diff --git a/files/templates/lottery.html b/files/templates/lottery.html index bd132f296..79be86ab4 100644 --- a/files/templates/lottery.html +++ b/files/templates/lottery.html @@ -2,10 +2,10 @@