From 47eda92e03bcd1681747c4a8ced170f775b65825 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Thu, 10 Sep 2020 19:07:43 -0500 Subject: [PATCH] Allow multiple word queries for youtube script --- scripts/appscripts/sxmo_youtube.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/appscripts/sxmo_youtube.sh b/scripts/appscripts/sxmo_youtube.sh index d49c17e..fc78e24 100755 --- a/scripts/appscripts/sxmo_youtube.sh +++ b/scripts/appscripts/sxmo_youtube.sh @@ -6,7 +6,7 @@ AUDIOONLY=0 youtubesearch() { QUERY="$1" 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 ' ' | awk -F" " '{DUR=$NF; NF-=1; print DUR " " $0}' | sed -E 's#([^ ]+)$#ytdl://\1#g'