-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Now updates run.bat -Included instructions on how to disable run.bat updates when running the script
- Loading branch information
Showing
1 changed file
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,32 @@ | ||
@echo OFF | ||
setlocal | ||
|
||
REM If you don't want run.bat to be automatically updated, please remove the code UNDER "yt-dlp.exe -U", but leave "title Updates done" and the code under it alone. This script should still end with "pause" and "exit". | ||
|
||
REM Update YT-DLP | ||
title Updating YT-DLP... | ||
|
||
yt-dlp.exe -U | ||
|
||
REM Update run.bat | ||
title Updating run.bat... | ||
|
||
echo . | ||
echo You may notice a large chunk of red text under this text, which you can ignore. I recommend updating run.bat through the actual releases on GitHub, this is just for your convenience. | ||
echo If you don't want run.bat to be automatically updated when you update YT-DLP, please edit this file and follow the instructions there. | ||
echo . | ||
|
||
powershell -executionpolicy Bypass -Command "& { Write-Output (Get-Location).Path.Split('\\')[-2] }" > tmp_folder.txt | ||
if exist tmp_folder.txt ( | ||
set /p folder_name=< tmp_folder.txt | ||
powershell -executionpolicy Bypass -Command "Invoke-WebRequest -Uri https://github.com/mrblomblo/yt-dlp-usage-script/releases/latest/download/run.bat -OutFile ..\%folder_name%\run.bat" | ||
del tmp_folder.txt | ||
echo run.bat has been updated. | ||
) else ( | ||
echo Error: Couldn't determine which folder run.bat is in. | ||
) | ||
|
||
title Updates done | ||
|
||
pause | ||
exit | ||
exit |