diff --git a/video_creation/final_video.py b/video_creation/final_video.py index 29b6eb1..5d9b74f 100755 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -101,8 +101,8 @@ def make_final_video( # Gather all audio clips if settings.config["settings"]["storymode"]: if settings.config["settings"]["storymodemethod"] == 0: - audio_clips = [AudioFileClip(f"assets/temp/{id}/mp3/title.mp3")] - audio_clips.insert(1, AudioFileClip(f"assets/temp/{id}/mp3/postaudio.mp3")) + audio_clips = [AudioFileClip(f"assets/temp/{reddit_id}/mp3/title.mp3")] + audio_clips.insert(1, AudioFileClip(f"assets/temp/{reddit_id}/mp3/postaudio.mp3")) elif settings.config["settings"]["storymodemethod"] == 1: audio_clips = [ AudioFileClip(f"assets/temp/{reddit_id}/mp3/postaudio-{i}.mp3") diff --git a/video_creation/screenshot_downloader.py b/video_creation/screenshot_downloader.py index 6a0a3b5..6df08a9 100644 --- a/video_creation/screenshot_downloader.py +++ b/video_creation/screenshot_downloader.py @@ -50,20 +50,22 @@ def get_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int): viewport=ViewportSize(width=W, height=H), device_scale_factor=dsf, ) - if settings.config["settings"]["storymodemethod"] == 1: - # for idx,item in enumerate(reddit_object["thread_post"]): - bgcolor = (255, 255, 255, 255) - txtcolor = (0, 0, 0) - imagemaker(theme=bgcolor, reddit_obj=reddit_object, txtclr=txtcolor) # set the theme and disable non-essential cookies if settings.config["settings"]["theme"] == "dark": cookie_file = open( "./video_creation/data/cookie-dark-mode.json", encoding="utf-8" ) + bgcolor = (33, 33, 36, 255) + txtcolor = (240, 240, 240) else: cookie_file = open( "./video_creation/data/cookie-light-mode.json", encoding="utf-8" ) + bgcolor = (255, 255, 255, 255) + txtcolor = (0, 0, 0) + if settings.config["settings"]["storymodemethod"] == 1: + # for idx,item in enumerate(reddit_object["thread_post"]): + imagemaker(theme=bgcolor, reddit_obj=reddit_object, txtclr=txtcolor) cookies = json.load(cookie_file) cookie_file.close()