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
}
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/')
case ${state} in

View File

@ -13,6 +13,8 @@ step "Fetching video information..."
title=$(${ydl} -e ${yurl})
playlist=$(${ydl} -g ${yurl})
success "Found \"${title}\""
step "Writing playlist..."
cat -s <<EOF >${HOME}/.config/mpd/playlists/mpc-yt.m3u
#EXTM3U