fix
This commit is contained in:
parent
715d1e9aae
commit
abbea15e7a
1 changed files with 12 additions and 1 deletions
13
youtube.sh
13
youtube.sh
|
@ -2,7 +2,13 @@
|
|||
|
||||
set -ex
|
||||
|
||||
read -p "Haben sie eine url? : [URL/suche] " suche
|
||||
if [ "$suche" == "suche" ]
|
||||
then
|
||||
read -p "Wie heißt das Stichwort? : " wort
|
||||
else
|
||||
read -p "Wie ist die URL? : " url
|
||||
fi
|
||||
read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/audio/video/BEST] : " format
|
||||
|
||||
if [ "$format" == "opus" ]
|
||||
|
@ -16,4 +22,9 @@ then
|
|||
format="-f 43"
|
||||
fi
|
||||
|
||||
youtube-dl -q $format -o- $url | mplayer -cache 8192 -
|
||||
if [ "$suche" == "suche" ]
|
||||
then
|
||||
youtube-dl "ytsearch:$wort" -q $format -o- | mplayer -fs -cache 8192 -
|
||||
else
|
||||
youtube-dl -q $format -o- $url | mplayer -fs -cache 8192 -
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue