bash/for_smol/ytmpdplay.sh

14 lines
204 B
Bash
Raw Normal View History

2023-02-14 18:22:28 +00:00
#!/usr/bin/env bash
: "${1?How to use: $0 YT_VIDEO_LINK}"
yt_link="$1"
play_link=$(yt-dlp -g "$yt_link" | sed '1d')
mpc clear 1>/dev/null
mpc add "$play_link" 1>/dev/null
mpc play 1>/dev/null
exit 0