From 72372dbffc09e501b382cdf93c1c6b4d83e52d38 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 28 Feb 2019 15:42:56 +0100 Subject: [PATCH] Print title on loading video Signed-off-by: Knut Ahlers --- .config/i3blocks/mpc | 2 +- bin/mpc-yt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/i3blocks/mpc b/.config/i3blocks/mpc index 5f9ed94..26e3fe4 100755 --- a/.config/i3blocks/mpc +++ b/.config/i3blocks/mpc @@ -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 diff --git a/bin/mpc-yt b/bin/mpc-yt index 40c9aa5..97f9cdb 100755 --- a/bin/mpc-yt +++ b/bin/mpc-yt @@ -13,6 +13,8 @@ step "Fetching video information..." title=$(${ydl} -e ${yurl}) playlist=$(${ydl} -g ${yurl}) +success "Found \"${title}\"" + step "Writing playlist..." cat -s <${HOME}/.config/mpd/playlists/mpc-yt.m3u #EXTM3U