From f5682dd483e34fd9f4d1983edbbaa93e2a8b4ac9 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 15 Mar 2023 08:00:02 +0200 Subject: [PATCH] fix video and audio links --- files/helpers/media.py | 4 ++-- files/routes/comments.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/helpers/media.py b/files/helpers/media.py index b4feba176..9bb0e3f50 100644 --- a/files/helpers/media.py +++ b/files/helpers/media.py @@ -59,9 +59,9 @@ def process_files(files, v, body): url = process_image(name, v) body = body.replace(f'[{file.filename}]', f'{url} ', 1) elif file.content_type.startswith('video/'): - body = body.replace(f'[{file.filename}]', process_video(file, v), 1) + body = body.replace(f'[{file.filename}]', f'{process_video(file, v)} ', 1) elif file.content_type.startswith('audio/'): - body = body.replace(f'[{file.filename}]', f"{SITE_FULL}{process_audio(file, v)}", 1) + body = body.replace(f'[{file.filename}]', f"{SITE_FULL}{process_audio(file, v)} ", 1) else: abort(415) diff --git a/files/routes/comments.py b/files/routes/comments.py index 908f6b93d..801150d54 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -213,9 +213,9 @@ def comment(v:User): abort(400, str(e)) body = body.replace(f'[{file.filename}]', f'{image} ', 1) elif file.content_type.startswith('video/'): - body = body.replace(f'[{file.filename}]', process_video(file, v), 1) + body = body.replace(f'[{file.filename}]', f'{process_video(file, v)} ', 1) elif file.content_type.startswith('audio/'): - body = body.replace(f'[{file.filename}]', f"{SITE_FULL}{process_audio(file, v)}", 1) + body = body.replace(f'[{file.filename}]', f"{SITE_FULL}{process_audio(file, v)} ", 1) else: abort(415)