From 7132bd60ca7c8522c0e63303f3ecaa249c53c36d Mon Sep 17 00:00:00 2001 From: Simon Woker Date: Fri, 5 Aug 2022 21:56:51 +0200 Subject: [PATCH] limit filename to 255 chars max length for filenames on windows --- video_creation/final_video.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video_creation/final_video.py b/video_creation/final_video.py index fd12642..d78863a 100755 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -125,7 +125,7 @@ def make_final_video( title = re.sub(r"[^\w\s-]", "", reddit_obj["thread_title"]) idx = re.sub(r"[^\w\s-]", "", reddit_obj["thread_id"]) - filename = f"{name_normalize(title)}.mp4" + filename = f"{name_normalize(title)[:251]}.mp4" subreddit = settings.config["reddit"]["thread"]["subreddit"] if not exists(f"./results/{subreddit}"):