From 55fc024ee97a3958e7b68885f94555cc4760023c Mon Sep 17 00:00:00 2001 From: Rafael Marçalo Date: Mon, 27 Sep 2021 22:41:40 +0000 Subject: If not able to use 720p use default resolution --- scripts/.local/bin/yt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/.local/bin/yt') diff --git a/scripts/.local/bin/yt b/scripts/.local/bin/yt index 4b620d7..fb8900a 100755 --- a/scripts/.local/bin/yt +++ b/scripts/.local/bin/yt @@ -3,5 +3,8 @@ VIDEO="https://www.youtube.com/watch?v=$(echo "<-" | dmenu -p "Youtube:" | xargs -I {} queryt -s "{}" | sed "s:\t: :g" | dmenu -l 10 -p "Video: " | awk '{print $1}')" if [ "$VIDEO" != "" ]; then - mpv "$VIDEO" + mpv --ytdl-format=22 "$VIDEO" + if [ $? -ne 0 ]; then + mpv "$VIDEO" + fi fi -- cgit v1.2.3