我正在使用 HotStarLiveStreamerhttps://github.com/biezom/hotstarsportslivestreamer我无法理解如何修改.bat 文件脚本来满足我的目的。
@ echo off
call set /p link=paste the link:
call set last=%%link:~-1,1%%
call set folder="%~dp0\videos\\"
call set livestreamer="%~dp0\tools\livestreamer\\"
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%"
IF %last% NEQ c GOTO:nocollection
call set /p id=enter the Id of the video (example write 1000021386):
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%id%%"
call set /p quality=write quality (example write 720p):
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%id%%" "%%quality%%" "%%folder%%" "%%livestreamer%%"
GOTO end1
:nocollection
call set /p quality=write quality (example write 720p):
call set /p choice=play or download? (write p or d):
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%quality%%" "%%folder%%" "%%livestreamer%%" "%%choice%%"
:end1
pause
:end
我想做的事情:
1)将文件夹更改为外部硬盘上的文件夹:M:\LiveStreamer;该软件当前位于 C 盘的根目录中:
2)让它自动输入720p
call set /p quality=write quality
3)让它自动输入“d”
call set /p choice=play or download? (write p or d):
谢谢
答案1
尝试这样做:
@echo off
call set /p link=paste the link:
call set last=%%link:~-1,1%%
rem call set folder="%~dp0\videos\\"
set folder=M:\\LiveStreamer
If Not Exist %folder% MD %folder%
call set livestreamer="%~dp0\tools\livestreamer\\"
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%"
IF %last% NEQ c GOTO:nocollection
call set /p id=enter the Id of the video (example write 1000021386):
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%id%%"
call set /p quality=write quality (example write 720p):
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%id%%" "%%quality%%" "%%folder%%" "%%livestreamer%%"
GOTO end1
:nocollection
rem call set /p quality=write quality (example write 720p):
Set quality=720p
rem call set /p choice=play or download? (write p or d):
set choice=d
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%quality%%" "%%folder%%" "%%livestreamer%%" "%%choice%%"
:end1
pause
:end