From 67ac8ea4e6fc2116d2435a3cdec86bbbbeb8ec04 Mon Sep 17 00:00:00 2001 From: Blomblo <63555404+mrblomblo@users.noreply.github.com> Date: Thu, 25 Apr 2024 20:36:21 +0000 Subject: [PATCH] Update run.bat Actually fixed it not working with spaces in the file path this time --- run.bat | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/run.bat b/run.bat index 8ae2e6e..0995f3d 100644 --- a/run.bat +++ b/run.bat @@ -107,9 +107,9 @@ cls title v2.7: Downloading... REM Downloads from the URL input with the file format that the user selected -if "%format%"=="a" %~dp0EXE\yt-dlp.exe -P %~dp0Downloads\Audio %aargs% -f "ba/b" -x --audio-format "mp3" -S acodec:%acodec% --embed-metadata --embed-thumbnail -o "%%(title)s.%%(ext)s" -w %URL% && @echo %date%: Audio - %URL%>>%~dp0log.txt -if "%format%"=="v" %~dp0EXE\yt-dlp.exe -P %~dp0Downloads\Video %vargs% -f "bv*[height>=4320]+ba/b[height>=4320] / bv*[height>=2160]+ba/b[height>=2160] / bv*[height>=1440]+ba/b[height>=1440] / bv*[height>=1080]+ba/b[height>=1080] / bv+ba/b" --merge-output-format mp4 -S vcodec:%vcodec% -S acodec:%acodec% --embed-metadata --embed-thumbnail -o "%%(title)s.%%(ext)s" -w %URL% && @echo %date%: Video - %URL%>>%~dp0log.txt -if "%format%"=="m" %~dp0EXE\yt-dlp.exe -P %~dp0Downloads\Music %margs% --sponsorblock-remove "music_offtopic" --ppa "ffmpeg:-c:v mjpeg -vf crop=\"'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'\"" -f "ba/b" -x --audio-format "flac" -S acodec:%mcodec% --embed-metadata --parse-metadata "%%(title)s:%%(title)s" --parse-metadata "%%(uploader,channel,creator,artist|null)s:%%(uploader)s" --parse-metadata "artist:(?P[^,]+)" --parse-metadata "%%(album_artist,meta_album_artist,uploader)s:%%(album_artist)s" --parse-metadata "%%(release_year,release_date>%%Y,upload_date>%%Y)s:%%(meta_date)s" --parse-metadata "%%(album,title)s:%%(meta_album)s" --embed-thumbnail --convert-thumbnails "jpg" --ppa "thumbnailsconvertor:-qmin 1 -q:v 1" -o "%%(uploader)s - %%(title)s.%%(ext)s" -w %URL% && @echo %date%: Music - %URL%>>%~dp0log.txt +if "%format%"=="a" "%~dp0EXE\yt-dlp.exe" -P %~dp0Downloads\Audio %aargs% -f "ba/b" -x --audio-format "mp3" -S acodec:%acodec% --embed-metadata --embed-thumbnail -o "%%(title)s.%%(ext)s" -w %URL% && @echo %date%: Audio - %URL%>>%~dp0log.txt +if "%format%"=="v" "%~dp0EXE\yt-dlp.exe" -P %~dp0Downloads\Video %vargs% -f "bv*[height>=4320]+ba/b[height>=4320] / bv*[height>=2160]+ba/b[height>=2160] / bv*[height>=1440]+ba/b[height>=1440] / bv*[height>=1080]+ba/b[height>=1080] / bv+ba/b" --merge-output-format mp4 -S vcodec:%vcodec% -S acodec:%acodec% --embed-metadata --embed-thumbnail -o "%%(title)s.%%(ext)s" -w %URL% && @echo %date%: Video - %URL%>>%~dp0log.txt +if "%format%"=="m" "%~dp0EXE\yt-dlp.exe" -P %~dp0Downloads\Music %margs% --sponsorblock-remove "music_offtopic" --ppa "ffmpeg:-c:v mjpeg -vf crop=\"'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'\"" -f "ba/b" -x --audio-format "flac" -S acodec:%mcodec% --embed-metadata --parse-metadata "%%(title)s:%%(title)s" --parse-metadata "%%(uploader,channel,creator,artist|null)s:%%(uploader)s" --parse-metadata "artist:(?P[^,]+)" --parse-metadata "%%(album_artist,meta_album_artist,uploader)s:%%(album_artist)s" --parse-metadata "%%(release_year,release_date>%%Y,upload_date>%%Y)s:%%(meta_date)s" --parse-metadata "%%(album,title)s:%%(meta_album)s" --embed-thumbnail --convert-thumbnails "jpg" --ppa "thumbnailsconvertor:-qmin 1 -q:v 1" -o "%%(uploader)s - %%(title)s.%%(ext)s" -w %URL% && @echo %date%: Music - %URL%>>%~dp0log.txt cls @@ -149,13 +149,13 @@ cls REM Opens the corresponding downloads folder depending on which file format the user chose if "%format%"=="m" ( - explorer %~dp0Downloads\Music + explorer "%~dp0Downloads\Music" ) if "%format%"=="a" ( - explorer %~dp0Downloads\Audio + explorer "%~dp0Downloads\Audio" ) if "%format%"=="v" ( - explorer %~dp0Downloads\Video + explorer "%~dp0Downloads\Video" ) REM Stops the script