devenver: Add yt-dlp

This commit is contained in:
doyle 2023-02-02 16:30:46 +11:00
parent 04fe6c9fd6
commit ce56e2f642
2 changed files with 68 additions and 38 deletions

View File

@ -301,6 +301,12 @@ def download_and_install_archive(download_url,
subprocess.run(command)
else:
archive_path = download_path
if archive_path.suffix == '.exe':
os.makedirs(exe_install_dir, exist_ok=True)
shutil.copy(archive_path, exe_install_dir)
else:
intermediate_zip_file_extracted = False
# We could have a "app.zst" situation or an "app.tar.zst" situation
@ -335,6 +341,7 @@ def download_and_install_archive(download_url,
# an additional archive to unzip, e.g. "app.tar" remaining.
intermediate_zip_file_extracted = len(archive_path.suffix) > 0
if len(archive_path.suffix) > 0:
command = f'"{zip7_exe}" x -aoa -spe -bso0 "{archive_path}" -o"{exe_install_dir}"'
command = command.replace('\\', '/')

View File

@ -1063,4 +1063,27 @@ def get_manifest():
# --------------------------------------------------------------------------
version = "2023.01.06"
result.append({
"label": "yt-dlp",
"manifests": [
{
"download_url": f"https://github.com/yt-dlp/yt-dlp/releases/download/{version}/yt-dlp.exe",
"download_checksum": "2ff706a386a6890d4fd6871609e99248402959b149781feaeb41fede1c5efea1",
"version": version,
"executables": [
{
"path": "yt-dlp.exe",
"symlink": ["yt-dlp.exe"],
"add_to_devenv_path": False,
"checksum": "2ff706a386a6890d4fd6871609e99248402959b149781feaeb41fede1c5efea1",
}
],
"add_to_devenv_script": [],
}
],
})
# --------------------------------------------------------------------------
return result