Print title on loading video

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-02-28 15:42:56 +01:00
parent 0ab4a0a256
commit 72372dbffc
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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