From 26af4064fc6eb6b6a28182ff4891f45c170425fb Mon Sep 17 00:00:00 2001 From: Andrew Chan Date: Wed, 28 Dec 2022 22:13:58 -0500 Subject: [PATCH] Fixed background loading bug --- video_creation/background.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/video_creation/background.py b/video_creation/background.py index 0405e66..8320e43 100644 --- a/video_creation/background.py +++ b/video_creation/background.py @@ -24,9 +24,10 @@ background_options.pop("__comment", None) for name in list(background_options.keys()): pos = background_options[name][3] - if pos != "center": - background_options[name][3] = lambda t: ("center", pos + t) + if pos == "center": + pos = 0 + background_options[name][3] = lambda t: ("center", pos + t) def get_start_and_end_times(video_length: int, length_of_clip: int) -> Tuple[int, int]: """Generates a random interval of time to be used as the background of the video.