fixed the conditions for downloading of background video

pull/280/head
iaacornus 3 years ago
parent 2541b9867b
commit 7861c1a077
No known key found for this signature in database
GPG Key ID: 281739AE7252598C

@ -19,20 +19,16 @@ def download_background(background):
Shoutout to: bbswitzer (https://www.youtube.com/watch?v=n_Dv4JMiwK8) Shoutout to: bbswitzer (https://www.youtube.com/watch?v=n_Dv4JMiwK8)
""" """
if not Path("assets/mp4/background.mp4").is_file():
print_step( # removed minecraft, since the background can be changed according to user input. print_step( # removed minecraft, since the background can be changed according to user input.
"We need to download the background video. This may be" "Downloading the background video."
+ " large, depending on the input but it's only done once."
) )
print_substep("Downloading the background video... please be patient.")
ydl_opts = { ydl_opts = {
"outtmpl": "assets/mp4/background.mp4", "outtmpl": "assets/mp4/background.mp4",
"merge_output_format": "mp4", "merge_output_format": "mp4",
} }
if background is not None or not Path("assets/mp4/background.mp4").is_file():
try: try:
with YoutubeDL(ydl_opts) as ydl: with YoutubeDL(ydl_opts) as ydl:
if background is None: if background is None:

Loading…
Cancel
Save