From 29430f62183c9672d39ff453aae9adf1cf1bfb72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Victor=20SDV?= Date: Wed, 12 Oct 2022 13:36:04 -0300 Subject: [PATCH] creating the correct title to thumbnail --- video_creation/final_video.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video_creation/final_video.py b/video_creation/final_video.py index 5a7deee..19e0da0 100644 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -160,6 +160,7 @@ def make_final_video( final = CompositeVideoClip([background_clip, image_concat]) title = re.sub(r"[^\w\s-]", "", reddit_obj["thread_title"]) idx = re.sub(r"[^\w\s-]", "", reddit_obj["thread_id"]) + title_thumb = reddit_obj["thread_title"] filename = f"{name_normalize(title)[:150]}" subreddit = settings.config["reddit"]["thread"]["subreddit"] @@ -183,7 +184,7 @@ def make_final_video( font_color = settingsbackground["background_thumbnail_font_color"] thumbnail = Image.open(f"assets/backgrounds/thumbnail.png") width, height = thumbnail.size - thumbnailSave = create_thumbnail(thumbnail, font_family, font_size, font_color, width, height, title) + thumbnailSave = create_thumbnail(thumbnail, font_family, font_size, font_color, width, height, title_thumb) thumbnailSave.save(f"./assets/temp/{id}/thumbnail.png") print_substep("Thumbnail - Building Thumbnail in assets/temp/{id}/thumbnail.png")