Anonymous
6/20/2025, 11:38:00 PM
No.105655397
YouTube search and play one-liner. Ytfzf does too fucking much and doesn't even work now.
Suggestions to streamline it welcome.
ytsearchmpv() { search="$@" && echo "Ctrl+C to stop; last entry URL is piped to mpv" ; trap 'return 0' INT ; yt-dlp -i ytsearch10:"$search" --get-id --get-title | tee /tmp/yt_titles ; trap - INT && tail -1 /tmp/yt_titles | tr -d '\n' | xargs yt-dlp -f 18 -o - | mpv - ; }
Suggestions to streamline it welcome.
ytsearchmpv() { search="$@" && echo "Ctrl+C to stop; last entry URL is piped to mpv" ; trap 'return 0' INT ; yt-dlp -i ytsearch10:"$search" --get-id --get-title | tee /tmp/yt_titles ; trap - INT && tail -1 /tmp/yt_titles | tr -d '\n' | xargs yt-dlp -f 18 -o - | mpv - ; }