Download function removed

pull/1194/head
RapidStoned 3 years ago
parent 893caaacef
commit 2d81952628

@ -19,7 +19,7 @@ from video_creation.background import (
get_background_config,
)
from video_creation.subOverlay import download_suboverlay
from video_creation.final_video import make_final_video
from video_creation.screenshot_downloader import download_screenshots_of_reddit_posts
from video_creation.voices import save_text_to_mp3
@ -52,7 +52,6 @@ def main(POST_ID=None):
download_screenshots_of_reddit_posts(reddit_object, number_of_comments)
bg_config = get_background_config()
download_background(bg_config)
download_suboverlay() # Check for suboverlay and download if not found!
chop_background_video(bg_config, length, reddit_object)
make_final_video(number_of_comments, length, reddit_object, bg_config)

@ -1,38 +0,0 @@
import requests
from os import makedirs
from os import path
from fileinput import filename
from utils.console import print_step, print_substep
from utils import settings
from pathlib import Path
# Checks if suboverlay is a thing, if not it downloads the file
# Uses Google Drive Direct Link to store the file
def download_suboverlay():
if settings.config["settings"]["sub_overlay"]:
URL = "https://drive.google.com/u/0/uc?id=16ajH0maciiWgWNgA-PNh29GZe9xqZmZR&export=download"
fileName = "youtube"
if settings.config["settings"]["sub_overlay_name"] == "tiktok":
URL = "https://drive.google.com/u/0/uc?id=1N7tmEacL5GSUpVukxwza7OL7ihfAdShq&export=download"
fileName = "tiktok"
if settings.config["settings"]["sub_overlay_name"] == "instagram":
URL = "https://drive.google.com/u/0/uc?id=19Yvuuojba8ixIP8whs0QEqw9gTer4T20&export=download"
fileName = "instagram"
if Path(f"assets/subOverlay/{fileName}.mov").is_file():
return
#Generate path and folders
if not path.isdir(f'assets/subOverlay'):
makedirs(f'assets/subOverlay')
print_step("We need to download the subscribe overlay, this only needs to be done once!")
print_substep("Downloading subscribe overlay please wait....")
subOverlayFile = requests.get(URL, verify=False)
open(f'assets/subOverlay/{fileName}.mov', 'wb').write(subOverlayFile.content)
print_substep("Subscribe overlay has been downloaded!", style="bold green")
Loading…
Cancel
Save