bash/for_smol/ytmpdplay.sh
cheesus_crust 9581bcc174 lets
2023-02-14 21:22:28 +03:00

14 lines
204 B
Bash
Executable File

#!/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