From 9e22e342fc63edbd6daeb8f3782286b877c91d69 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 22 Jun 2022 14:50:49 +0100 Subject: helpful beets stuff --- kshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kshrc b/kshrc index 344a199..f40b227 100644 --- a/kshrc +++ b/kshrc @@ -76,10 +76,10 @@ yta() { # search for a file and download instantly ytda() { - cd ~/Downloads && yt-dlp -f 'bestaudio' -x --audio-format mp3 ytsearch:"$*" -o '%(title)s.%(ext)s' && cd - || return + cd ~/Downloads && yt-dlp -f 'bestaudio' -x --audio-format mp3 ytsearch"$2":"$1" -o '%(title)s.%(ext)s' && cd - || return } -# get best audio of YouTube file +# get best audio of YouTube file or playlist (just use the right URL) ytmp3 () { if [ -z "$1" ]; then print "I need a valid YouTube URL.\n"; fi cd ~/Downloads && yt-dlp -f 'ba' -x --audio-format mp3 "$1" -o '%(title)s.%(ext)s' && cd - || return -- cgit v1.2.3