diff --git a/deploy.py b/deploy.py index 2b91d07..c3e9f4b 100644 --- a/deploy.py +++ b/deploy.py @@ -94,7 +94,7 @@ def get_ffmpeg_version(): return ffmpeg_version -def fetch_and_cut_song(tape, ffmpeg_version, suppress_ssl_verify=False): +def fetch_and_cut_song(tape, ffmpeg_version): python_executable = "./utils/python-3.9.7-embed-amd64/python.exe" script = "./fetch_song.py" @@ -104,9 +104,6 @@ def fetch_and_cut_song(tape, ffmpeg_version, suppress_ssl_verify=False): fetch = [python_executable, script, tape["source"]["url"], "-x", "--audio-format", "vorbis", "--audio-quality", "0", "-o", f"./build/tmp_music/{tape['identifier']}.ogg"] - if suppress_ssl_verify: - fetch += ["--no-check-certificate"] - # this is done in a separate python script because subprocess.call makes sure that the # download process is finished before trying to cut the song @@ -158,7 +155,7 @@ def assemble_png_image(tapes, icons=False): new_im.save("./build/covers.png") -def prepare_music(data, config): +def prepare_music(data): try: os.mkdir('./build/music/') except FileExistsError: @@ -172,7 +169,7 @@ def prepare_music(data, config): for tape in data: if not os.path.exists(f"./build/music/{tape['identifier']}.ogg"): logging.info(f"Downloading {tape['name']}") - fetch_and_cut_song(tape, ffmpeg_version, suppress_ssl_verify=config["suppress_ssl_verify"]) + fetch_and_cut_song(tape, ffmpeg_version) else: logging.info(f"Skipping {tape['name']}") @@ -251,7 +248,7 @@ def deploy(config): with data_file.open(encoding='utf-8') as fr: data = yaml.load(fr, Loader=yaml.SafeLoader) - prepare_music(data, config) + prepare_music(data) prepare_images(data, config) build_xml_code(data, config) diff --git a/main.py b/main.py index ff5c6e8..7f9045d 100644 --- a/main.py +++ b/main.py @@ -207,8 +207,7 @@ def create_deploy_frame(container, config): "name": config["name"].get(), "slug": config["slug"].get(), "resolution_x": int(config["resolution_x"].get()), - "resolution_y": int(config["resolution_y"].get()), - "suppress_ssl_verify": suppress_ssl_verify.get() == "1"} + "resolution_y": int(config["resolution_y"].get())} logging.info(f"deploying with config: {config_values}") deploy(config_values) @@ -299,21 +298,6 @@ def create_deploy_frame(container, config): frame_3.pack(side="top", fill="x") - suppress_ssl_verify = tk.StringVar() - suppress_ssl_verify.set("0") - suppress_ssl_verify_check = ttk.Checkbutton( - frame, - variable=suppress_ssl_verify, - text='Use --no-check-certificate option. (Not recommended!)', - command=lambda: print(suppress_ssl_verify.get())) - - Hovertip(suppress_ssl_verify_check, - 'Suppress HTTPS certificate validation in youtube-dl.\n' - 'This is a workaround if you have expired system root certificates.\n' - 'You should rather find a way to update your system root certificates.') - - suppress_ssl_verify_check.pack(side="top", fill="x") - does_ffmpeg_exists() return frame