14 lines
204 B
Bash
Executable File
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
|