summaryrefslogtreecommitdiff
path: root/scripts/.local/bin/yt
diff options
context:
space:
mode:
authorRafael Marçalo <raroma09@gmail.com>2021-09-27 22:41:40 +0000
committerRafael Marçalo <raroma09@gmail.com>2021-09-27 22:41:40 +0000
commit55fc024ee97a3958e7b68885f94555cc4760023c (patch)
treeead99029b515c2164719dd25d8f2ff5e407f0ce0 /scripts/.local/bin/yt
parent6872292618905546af8ce6b89589b45859cb137d (diff)
If not able to use 720p use default resolution
Diffstat (limited to 'scripts/.local/bin/yt')
-rwxr-xr-xscripts/.local/bin/yt5
1 files changed, 4 insertions, 1 deletions
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