From 7861c1a0778ecd871a69273cf49104be15cef1d4 Mon Sep 17 00:00:00 2001 From: iaacornus Date: Sun, 5 Jun 2022 11:28:50 +0800 Subject: [PATCH] fixed the conditions for downloading of background video --- video_creation/background.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/video_creation/background.py b/video_creation/background.py index 514388b..a14bd8a 100644 --- a/video_creation/background.py +++ b/video_creation/background.py @@ -19,20 +19,16 @@ def download_background(background): Shoutout to: bbswitzer (https://www.youtube.com/watch?v=n_Dv4JMiwK8) """ + print_step( # removed minecraft, since the background can be changed according to user input. + "Downloading the background video." + ) - if not Path("assets/mp4/background.mp4").is_file(): - print_step( # removed minecraft, since the background can be changed according to user input. - "We need to download the background video. This may be" - + " large, depending on the input but it's only done once." - ) - - print_substep("Downloading the background video... please be patient.") - - ydl_opts = { - "outtmpl": "assets/mp4/background.mp4", - "merge_output_format": "mp4", - } + ydl_opts = { + "outtmpl": "assets/mp4/background.mp4", + "merge_output_format": "mp4", + } + if background is not None or not Path("assets/mp4/background.mp4").is_file(): try: with YoutubeDL(ydl_opts) as ydl: if background is None: