Print title on loading video
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
0ab4a0a256
commit
72372dbffc
2 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,7 @@ set -euo pipefail
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
title=$(mpc | head -n1 | tr -cd "[:print:]" | cut -c 1-75)
|
title=$(mpc | head -n1 | tr -cd "[:print:]")
|
||||||
state=$(mpc | grep '^\[' | sed -E 's/^\[(.+)\].*/\1/')
|
state=$(mpc | grep '^\[' | sed -E 's/^\[(.+)\].*/\1/')
|
||||||
|
|
||||||
case ${state} in
|
case ${state} in
|
||||||
|
|
|
@ -13,6 +13,8 @@ step "Fetching video information..."
|
||||||
title=$(${ydl} -e ${yurl})
|
title=$(${ydl} -e ${yurl})
|
||||||
playlist=$(${ydl} -g ${yurl})
|
playlist=$(${ydl} -g ${yurl})
|
||||||
|
|
||||||
|
success "Found \"${title}\""
|
||||||
|
|
||||||
step "Writing playlist..."
|
step "Writing playlist..."
|
||||||
cat -s <<EOF >${HOME}/.config/mpd/playlists/mpc-yt.m3u
|
cat -s <<EOF >${HOME}/.config/mpd/playlists/mpc-yt.m3u
|
||||||
#EXTM3U
|
#EXTM3U
|
||||||
|
|
Loading…
Reference in a new issue