14 lines
204 B
Bash
14 lines
204 B
Bash
|
#!/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
|