diff --git a/files/helpers/const.py b/files/helpers/const.py
index 00e7890545..32905bd02c 100644
--- a/files/helpers/const.py
+++ b/files/helpers/const.py
@@ -54,9 +54,8 @@ if SITE_NAME == 'rDrama':
"fag": "cute twink",
"pedophile": "libertarian",
"kill yourself": "keep yourself safe",
- "n1gger": "BIPOC",
- "nlgger": "BIPOC",
"nigger": "BIPOC",
+ "niglet": "BIPOClet",
"steve akins": "penny verity oaken",
"trannie": "🚂🚃🚃",
"tranny": "🚂🚃🚃",
@@ -408,7 +407,7 @@ AWARDS = {
"description": "Makes flies swarm the post.",
"icon": "fas fa-poop",
"color": "text-black-50",
- "price": 300
+ "price": 500
},
"fireflies": {
"kind": "fireflies",
@@ -416,7 +415,7 @@ AWARDS = {
"description": "Makes fireflies swarm the post.",
"icon": "fas fa-sparkles",
"color": "text-warning",
- "price": 300
+ "price": 500
},
"train": {
"kind": "train",
@@ -424,7 +423,7 @@ AWARDS = {
"description": "Summons a train on the post.",
"icon": "fas fa-train",
"color": "text-pink",
- "price": 300
+ "price": 500
},
"scooter": {
"kind": "scooter",
@@ -432,7 +431,7 @@ AWARDS = {
"description": "Summons a scooter on the post.",
"icon": "fas fa-flag-usa",
"color": "text-muted",
- "price": 300
+ "price": 500
},
"wholesome": {
"kind": "wholesome",
@@ -440,7 +439,7 @@ AWARDS = {
"description": "Summons a wholesome marsey on the post.",
"icon": "fas fa-smile-beam",
"color": "text-yellow",
- "price": 300
+ "price": 500
},
"firework": {
"kind": "firework",
@@ -448,7 +447,7 @@ AWARDS = {
"description": "Summons fireworks on the post.",
"icon": "fas fa-bahai",
"color": "text-danger",
- "price": 300
+ "price": 500
},
"confetti": {
"kind": "confetti",
@@ -456,7 +455,7 @@ AWARDS = {
"description": "Summons confetti to fall on the post.",
"icon": "fas fa-party-horn",
"color": "text-yellow",
- "price": 300
+ "price": 500
},
"ricardo": {
"kind": "ricardo",
@@ -472,7 +471,7 @@ AWARDS = {
"description": "Tilts the post or comment",
"icon": "fas fa-car-tilt",
"color": "text-blue",
- "price": 300
+ "price": 500
},
"glowie": {
"kind": "glowie",
@@ -480,7 +479,7 @@ AWARDS = {
"description": "Indicates that the recipient can be seen when driving. Just run them over.",
"icon": "fas fa-user-secret",
"color": "text-green",
- "price": 300
+ "price": 500
},
"rehab": {
"kind": "rehab",
@@ -936,7 +935,7 @@ image_check_regex = re.compile(f'!\[\]\(((?!(https:\/\/([a-z0-9-]+\.)*({hosts})\
embed_fullmatch_regex = re.compile(f'https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*', flags=re.A)
video_sub_regex = re.compile(f'(
[^<]*)(https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*?\.(mp4|webm|mov))', flags=re.A)
-audio_sub_regex = re.compile(f'(
[^<]*)(https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*?\.(mp3|wav|ogg|aac|m4a))', flags=re.A)
+audio_sub_regex = re.compile(f'(
[^<]*)(https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*?\.(mp3|wav|ogg|aac|m4a|flac))', flags=re.A)
imgur_regex = re.compile('(https://i\.imgur\.com/([a-z0-9]+))\.(jpg|png|jpeg|webp)(?!<\/(code|pre|a)>)', flags=re.I|re.A)
diff --git a/files/helpers/media.py b/files/helpers/media.py
index 8ded235725..ab684d8bfd 100644
--- a/files/helpers/media.py
+++ b/files/helpers/media.py
@@ -10,7 +10,7 @@ from .const import *
def process_audio(file):
- name = f'/audio/{time.time()}'.replace('.','') + '.mp3'
+ name = f'/audio/{time.time()}'.replace('.','') + '.' + file.filename.split('.')[-1]
file.save(name)
if SITE_NAME == 'WPD' or os.stat(name).st_size > 8 * 1024 * 1024:
@@ -28,7 +28,7 @@ def process_video(file):
os.system(f'ffmpeg -y -loglevel warning -i {name} -map_metadata -1 -c:v copy -c:a copy {name}.mp4')
os.remove(name)
- name += '.mp4'
+ name += '.' + file.filename.split('.')[-1]
size = os.stat(name).st_size
if SITE_NAME == 'WPD' or os.stat(name).st_size > 8 * 1024 * 1024:
diff --git a/files/routes/static.py b/files/routes/static.py
index 937f7a0eb8..60f4dbe306 100644
--- a/files/routes/static.py
+++ b/files/routes/static.py
@@ -473,7 +473,7 @@ def static_service(path):
@app.get("/static/images/")
@limiter.exempt
def images(path):
- resp = make_response(send_from_directory('/images', path.replace('.WEBP','.webp')))
+ resp = make_response(send_from_directory('/images', path))
resp.headers.remove("Cache-Control")
resp.headers.add("Cache-Control", "public, max-age=3153600")
resp.headers.remove("Content-Type")
@@ -483,21 +483,17 @@ def images(path):
@app.get('/videos/')
@limiter.exempt
def videos(path):
- resp = make_response(send_from_directory('/videos', path.replace('.MP4','.mp4')))
+ resp = make_response(send_from_directory('/videos', path))
resp.headers.remove("Cache-Control")
resp.headers.add("Cache-Control", "public, max-age=3153600")
- resp.headers.remove("Content-Type")
- resp.headers.add("Content-Type", "video/mp4")
return resp
@app.get('/audio/')
@limiter.exempt
def audio(path):
- resp = make_response(send_from_directory('/audio', path.replace('.mp3','.mp3')))
+ resp = make_response(send_from_directory('/audio', path))
resp.headers.remove("Cache-Control")
resp.headers.add("Cache-Control", "public, max-age=3153600")
- resp.headers.remove("Content-Type")
- resp.headers.add("Content-Type", "audio/mpeg")
return resp
@app.get("/robots.txt")
diff --git a/files/templates/authforms.html b/files/templates/authforms.html
index cb301b14fa..caf15e9580 100644
--- a/files/templates/authforms.html
+++ b/files/templates/authforms.html
@@ -15,7 +15,7 @@
{% if v %}
-
+
{% if v.agendaposter %}
-
+
{% endif %}
diff --git a/files/templates/chat.html b/files/templates/chat.html
index efac02432c..50b72009e7 100644
--- a/files/templates/chat.html
+++ b/files/templates/chat.html
@@ -14,7 +14,7 @@
Chat
-
+
{% if v.css %}
diff --git a/files/templates/default.html b/files/templates/default.html
index 1e5d2258e8..b07d3ef1bb 100644
--- a/files/templates/default.html
+++ b/files/templates/default.html
@@ -8,7 +8,7 @@
{% if v %}
-
+
{% if v.agendaposter %}
@@ -34,7 +34,7 @@
{% endif %}
{% else %}
-
+
{% endif %}
diff --git a/files/templates/log.html b/files/templates/log.html
index 84be8516c2..1947cb192b 100644
--- a/files/templates/log.html
+++ b/files/templates/log.html
@@ -6,7 +6,7 @@
{% block content %}
{% if v %}
-
+
{% if v.agendaposter %}
-
+
{% endif %}
diff --git a/files/templates/login.html b/files/templates/login.html
index 2bd99d41c9..9caf508fd7 100644
--- a/files/templates/login.html
+++ b/files/templates/login.html
@@ -18,7 +18,7 @@
{% endblock %}
-
+
diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html
index 0960338a50..39d4d899a2 100644
--- a/files/templates/login_2fa.html
+++ b/files/templates/login_2fa.html
@@ -14,7 +14,7 @@
2-Step Login - {{SITE_NAME}}
-
+
diff --git a/files/templates/settings.html b/files/templates/settings.html
index 4a2f8157d4..d7c2f1e13e 100644
--- a/files/templates/settings.html
+++ b/files/templates/settings.html
@@ -34,7 +34,7 @@
-
+
{% if v.agendaposter %}
-
+
{% else %}
-
+
{% endif %}
diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html
index c3034eb8f2..65b5a6d08a 100644
--- a/files/templates/sign_up.html
+++ b/files/templates/sign_up.html
@@ -31,7 +31,7 @@
{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}
-
+
diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html
index 59e18dda08..9d56fc1174 100644
--- a/files/templates/sign_up_failed_ref.html
+++ b/files/templates/sign_up_failed_ref.html
@@ -32,7 +32,7 @@
{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}
-
+
diff --git a/files/templates/submit.html b/files/templates/submit.html
index 2ea50ab8f3..36318baaef 100644
--- a/files/templates/submit.html
+++ b/files/templates/submit.html
@@ -26,7 +26,7 @@
{% block stylesheets %}
{% if v %}
-
+
{% if v.agendaposter %}
-
+
{% endif %}
{% endblock %}
diff --git a/ubuntu_setup b/ubuntu_setup
index 99f5c7641b..bef1a29509 100644
--- a/ubuntu_setup
+++ b/ubuntu_setup
@@ -2,11 +2,17 @@ update-locale LANG=en_US.utf8
cd /rDrama
cp ./env /env
. /env
-apt update
+apt -y update
apt -y upgrade
-apt -y install git postgresql postgresql-contrib redis-server python3-pip libenchant1c2a ffmpeg tmux nginx snapd ufw
-cp pg_hba.conf /etc/postgresql/12/main/pg_hba.conf
+apt -y install git redis-server python3-pip libenchant1c2a ffmpeg tmux nginx snapd ufw
+
+sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
+wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
+apt -y update
+apt -y install postgresql-14
+cp pg_hba.conf /etc/postgresql/14/main/pg_hba.conf
service postgresql restart
+
# psql -U postgres -f schema.sql postgres
# psql -U postgres -f seed-db.sql postgres
pip3 install -r requirements.txt