fix
This commit is contained in:
parent
812e104d52
commit
1457022954
2 changed files with 16 additions and 11 deletions
|
@ -5,7 +5,7 @@ set -ex
|
||||||
if [ "$1" == "--help" ] || [[ -z "$1" ]]
|
if [ "$1" == "--help" ] || [[ -z "$1" ]]
|
||||||
then
|
then
|
||||||
echo "bash ./youtube-dl.sh URL PFAD FORMAT"
|
echo "bash ./youtube-dl.sh URL PFAD FORMAT"
|
||||||
echo "Formate: opus/audio/video/BEST/4k"
|
echo "Formate: [opus/m4a/video/hd/fullhd/4k]"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
25
youtube.sh
25
youtube.sh
|
@ -2,21 +2,26 @@
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
read -p "Haben sie eine url? : [URL/suche] " suche
|
if [ "$1" == "--help" ] || [[ -z "$1" ]]
|
||||||
if [ "$suche" == "suche" ]
|
|
||||||
then
|
then
|
||||||
read -p "Wie heißt das Stichwort? : " wort
|
echo "bitte alles kleinschreiben"
|
||||||
else
|
echo "bash ./youtube-dl.sh SUCHE/NOSUCHE URL/SUCHE FORMAT VOLLBILD/NOVOLLBILD"
|
||||||
read -p "Wie ist die URL? : " url
|
echo "Formate: [opus/m4a/video/hd/fullhd/4k]"
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -p "Vollbild? : [Y/n] " vollbild
|
suche="$1"
|
||||||
if [ "$vollbild" != "n" ]
|
url="$2"
|
||||||
|
format="$3"
|
||||||
|
|
||||||
|
if [ "$4" == "vollbild" ]
|
||||||
then
|
then
|
||||||
voll="-fs"
|
voll="-fs"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/m4a/video/hd/fullhd/4k] : " format
|
#read -p "Wie ist die URL? : " url
|
||||||
|
#read -p "Wo sollen die Dateien heruntergeladen werden? : " pfad
|
||||||
|
#read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/m4a/video/hd/fullhd/4k] : " format
|
||||||
|
|
||||||
if [ "$format" == "opus" ]
|
if [ "$format" == "opus" ]
|
||||||
then
|
then
|
||||||
|
@ -40,7 +45,7 @@ fi
|
||||||
|
|
||||||
if [ "$suche" == "suche" ]
|
if [ "$suche" == "suche" ]
|
||||||
then
|
then
|
||||||
youtube-dl "ytsearch:$wort" -q --force-ipv4 $format -o- | mplayer $voll -cache 8192 -
|
youtube-dl "ytsearch:$wort" -q --force-ipv4 $format -o- | mplayer $voll -cache 8192 -ao pulse -
|
||||||
else
|
else
|
||||||
youtube-dl -q --force-ipv4 $format -o- $url | mplayer $voll -cache 8192 -
|
youtube-dl -q --force-ipv4 $format -o- $url | mplayer $voll -cache 8192 -ao pulse -
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue