~hnaguski/aart

482538d398a942210afa19bd767f82f6fe70196e — Henry Naguski 1 year, 10 months ago 9914c5c
fix first_start not setting art until song changes if it's already playing
1 files changed, 6 insertions(+), 4 deletions(-)

M aart
M aart => aart +6 -4
@@ 81,10 81,12 @@ first_start() {
	# check if mpd is running
	pgrep mpd >/dev/null || exit 1

	# check status of mpd, if it's stopped then wait for mpd to start playing a
	# song and set the art. Maybe only check for playing, I leave mpd paused
	# quite often
	mpc status | grep -o "playing\|paused" > /dev/null || set_art "$(mpc -q	current --wait -f %file%)"
	# check status of mpd, if it's stopped then wait for mpd to start playing
	# a song. Maybe only check for playing, I leave mpd paused quite often
	mpc status | grep -o "playing\|paused" > /dev/null || mpc -q current --wait

	# set the art
	set_art "$(mpc -q current -f %file%)"

	# open image viewer on the art and store the pid
	sxiv -b art & viewer_pid=$!