@rem yt-dlp helper for easier syntax. Always includes the no check certificate option, as it doesn't hurt to have it.
@echo off
setlocal
call "%~dp0_loadpaths.cmd"
set "OUTDIR=%YOUTUBE_DIR%"
if not exist "%OUTDIR%" mkdir "%OUTDIR%"
pushd "%OUTDIR%" || exit /b 1
yt-dlp.exe -x -k --no-check-certificate "%1" %2 %3 %4 %5
del /s/q *.f???.*
set "STATUS=%ERRORLEVEL%"
popd
exit /b %STATUS%
