From d712b8cf94b699dfb59bad4c3b954882486729c7 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 22 May 2022 20:04:11 +0200 Subject: [PATCH] fds --- files/helpers/media.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/files/helpers/media.py b/files/helpers/media.py index 0c9932251..1ebe92acf 100644 --- a/files/helpers/media.py +++ b/files/helpers/media.py @@ -15,8 +15,7 @@ def process_video(file): os.remove(name) with open(f"{name}.mp4", 'rb') as f: - if SITE_NAME != 'rDrama' or os.stat(f'{name}.mp4').st_size > 8 * 1024 * 1024: - os.remove(f"{name}.mp4") + if SITE_NAME != 'rDrama' or os.stat(f'{name}.mp4').st_size > 8 * 1024 * 1024: os.remove(f"{name}.mp4") try: req = requests.request("POST", "https://pomf2.lain.la/upload.php", files={'files[]': f}, timeout=20).json() except requests.Timeout: return {"error": "Video upload timed out, please try again!"} try: return req['files'][0]['url']