Sorry! Final fix for my mistakes

pull/1410/head
Simon 2 years ago
parent ceb1cff7d0
commit c88a435f1c

@ -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")

@ -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()

Loading…
Cancel
Save