Allow multiple word queries for youtube script
This commit is contained in:
parent
bbdf195090
commit
47eda92e03
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ AUDIOONLY=0
|
||||||
youtubesearch() {
|
youtubesearch() {
|
||||||
QUERY="$1"
|
QUERY="$1"
|
||||||
NRESULTS="$2"
|
NRESULTS="$2"
|
||||||
youtube-dl -f '[height<420]' -e --get-id --get-duration ytsearch$NRESULTS:$QUERY |
|
youtube-dl -f '[height<420]' -e --get-id --get-duration "ytsearch$NRESULTS:$QUERY" |
|
||||||
paste - - - -d ' ' |
|
paste - - - -d ' ' |
|
||||||
awk -F" " '{DUR=$NF; NF-=1; print DUR " " $0}' |
|
awk -F" " '{DUR=$NF; NF-=1; print DUR " " $0}' |
|
||||||
sed -E 's#([^ ]+)$#ytdl://\1#g'
|
sed -E 's#([^ ]+)$#ytdl://\1#g'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue