From 08f7132f3ce340b252651cf20041498655b3016d Mon Sep 17 00:00:00 2001 From: iaacornus Date: Mon, 6 Jun 2022 18:22:33 +0800 Subject: [PATCH] little fixes --- video_creation/background.py | 4 +--- video_creation/final_video.py | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/video_creation/background.py b/video_creation/background.py index 7dfa22f..eccb3a5 100644 --- a/video_creation/background.py +++ b/video_creation/background.py @@ -1,8 +1,6 @@ import re import os from random import randrange -from pathlib import Path -from turtle import back from yt_dlp import YoutubeDL from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip @@ -30,7 +28,7 @@ def download_background(background): "merge_output_format": "mp4", } - background_check = Path("assets/mp4/background.mp4").is_file() + background_check = os.path.isfile("assets/mp4/background.mp4") if background is not None or not background_check: if background_check and background is not None: print_substep( diff --git a/video_creation/final_video.py b/video_creation/final_video.py index f4b2e8d..7b1ed02 100644 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -22,7 +22,7 @@ W, H = 1080, 1920 def make_final_video(number_of_clips, file_name): # Calls opacity from the .env load_dotenv() - opacity = os.getenv('OPACITY') + opacity = os.getenv("OPACITY") print_step("Creating the final video...") @@ -44,7 +44,6 @@ def make_final_video(number_of_clips, file_name): TypeError ): print(f"Please ensure that OPACITY is set between 0 and 1 in your .env file") - configured = False # Gather all audio clips audio_clips = []