[+] Add interactive Command Line in youtube-downloder
This commit is contained in:
parent
1cf4ddf405
commit
e522e9dd0d
1 changed files with 4 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -ex
|
||||
|
||||
if [ "$1" == "--help" ] || [[ -z "$1" ]]
|
||||
if [ "$1" == "--help" ]
|
||||
then
|
||||
echo "bash ./youtube-dl.sh URL FORMAT"
|
||||
echo "Formate: [opus/m4a/video/hd/fullhd/4k]"
|
||||
|
@ -12,6 +12,9 @@ fi
|
|||
url="$1"
|
||||
format="$2"
|
||||
|
||||
[[ -z "${url}" ]] && read -p "URL: " url
|
||||
[[ -z "${format}" ]] && read -p "Format [opus/m4a/video/hd/fullhd/4k]: " format
|
||||
|
||||
if [ "$format" == "opus" ]
|
||||
then
|
||||
format="--audio-format opus"
|
||||
|
|
Loading…
Reference in a new issue