From 6937f10e1be38ab0fd719563b93a8044a3ca56b1 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 16 Jun 2022 13:36:35 -0400 Subject: [PATCH 1/3] Improved download and annoying user fixes/redundancies --- video_creation/background.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/video_creation/background.py b/video_creation/background.py index 162380e..533db04 100644 --- a/video_creation/background.py +++ b/video_creation/background.py @@ -7,9 +7,6 @@ from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip from moviepy.editor import VideoFileClip from utils.console import print_step, print_substep -import datetime - - def get_start_and_end_times(video_length, length_of_clip): random_time = randrange(180, int(length_of_clip) - int(video_length)) return random_time, random_time + video_length @@ -20,14 +17,14 @@ def download_background(): Path("./assets/backgrounds/").mkdir(parents=True, exist_ok=True) background_options = [ # uri , filename , credit ("https://www.youtube.com/watch?v=n_Dv4JMiwK8", "parkour.mp4", "bbswitzer"), - ( - "https://www.youtube.com/watch?v=2X9QGY__0II", - "rocket_league.mp4", - "Orbital Gameplay", - ), + #( + # "https://www.youtube.com/watch?v=2X9QGY__0II", + # "rocket_league.mp4", + # "Orbital Gameplay", + #), ] - # note: make sure the file name doesn't include a - in it - if len(listdir("./assets/backgrounds")) != len( + # note: make sure the file name doesn't include an - in it + if not len(listdir("./assets/backgrounds")) <= len( background_options ): # if there are any background videos not installed print_step( @@ -35,6 +32,8 @@ def download_background(): ) print_substep("Downloading the backgrounds videos... please be patient 🙏 ") for uri, filename, credit in background_options: + if Path(f'assets/backgrounds/{credit}-{filename}').is_file(): + continue # adds check to see if file exists before downloading print_substep(f"Downloading {filename} from {uri}") YouTube(uri).streams.filter(res="1080p").first().download( "assets/backgrounds", filename=f"{credit}-{filename}" @@ -60,5 +59,4 @@ def chop_background_video(video_length): targetname="assets/temp/background.mp4", ) print_substep("Background video chopped successfully!", style="bold green") - noerror = True - return noerror + return True From 819e642b863ba0368eabc5acd1a6f2afc96bdec7 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 16 Jun 2022 13:36:44 -0400 Subject: [PATCH 2/3] added a secret value --- .env.template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.template b/.env.template index cb2fa3b..b66ec3e 100644 --- a/.env.template +++ b/.env.template @@ -14,7 +14,7 @@ RANDOM_THREAD="" COMMENT_LENGTH_RANGE = "min,max" # The absolute path of the folder where you want to save the final video -# If empty or wrong, the path will be 'assets/' +# If empty or wrong, the path will be 'results/' FINAL_VIDEO_PATH="" # Valid options are "yes" and "no" for the variable below REDDIT_2FA="" @@ -35,4 +35,5 @@ OPACITY="1" VOICE="en_us_001" # e.g. en_us_002 # IN-PROGRESS - not yet implemented +TTsChoice="TikTok" # todo add docs STORYMODE="False" From b8c6ae2dc1d4b7e450480531d1ab1e6b5b46c7fe Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 16 Jun 2022 13:45:19 -0400 Subject: [PATCH 3/3] added luke's chanmges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 278dbb5..f9b2aee 100644 --- a/README.md +++ b/README.md @@ -72,10 +72,10 @@ Elebumm (Lewis#6305) - https://github.com/elebumm (Founder) Jason (JasonLovesDoggo#1904) - https://github.com/JasonLovesDoggo -CallumIO - https://github.com/CallumIO +CallumIO (c.#6837) - https://github.com/CallumIO HarryDaDev (hrvyy#9677) - https://github.com/ImmaHarry LukaHietala (Pix.#0001) - https://github.com/LukaHietala -Freebiell - https://github.com/FreebieII +Freebiell (Freebie#6429) - https://github.com/FreebieII