Skip to content

Commit

Permalink
Merge pull request #3 from oz0820/main
Browse files Browse the repository at this point in the history
Switched from bitsadmin to curl for file downloads
  • Loading branch information
quadseed authored Mar 4, 2024
2 parents 868d49a + c9873a9 commit 6cfa934
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions !!!-setup.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@echo off
chcp 65001 > nul

where curl > nul 2>&1
set "curlExists=%errorlevel%"

mkdir bin
cd bin

Expand All @@ -18,7 +21,13 @@ IF exist .\yt-dlp.exe (

echo [Info] (1/3) ffmpegをダウンロードします
timeout 3
bitsadmin /transfer "ffmpeg" /priority FOREGROUND https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip %~dp0/bin/ffmpeg-build.zip

if %curlExists% equ 0 (
curl -L -o %~dp0/bin/ffmpeg-build.zip https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip
) else (
bitsadmin /transfer "ffmpeg" /priority FOREGROUND https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip %~dp0/bin/ffmpeg-build.zip
)

timeout 1
echo [Info] (2/3) ffmpegを解凍します
call powershell -command "Expand-Archive ffmpeg-build.zip"
Expand All @@ -29,7 +38,12 @@ rmdir /Q /S ffmpeg-build

echo [Info] (3/3) yt-dlp.exeをダウンロードします
timeout 3
bitsadmin /transfer "yt-dlp" /priority FOREGROUND https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe %~dp0/bin/yt-dlp.exe

if %curlExists% equ 0 (
curl -L -o %~dp0/bin/yt-dlp.exe https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe
) else (
bitsadmin /transfer "yt-dlp" /priority FOREGROUND https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe %~dp0/bin/yt-dlp.exe
)


echo [Info] セットアップ完了
Expand Down

0 comments on commit 6cfa934

Please sign in to comment.