From 6f0abd1b31e78d34876335717255d1a227412591 Mon Sep 17 00:00:00 2001 From: Salt Date: Tue, 1 Aug 2017 00:54:55 -0500 Subject: [PATCH] Don't restart playback when unnecessary Because mpc-i3-playlists was doing that. Because I'm bad. --- .bin/mpc/mpc-i3-playlists | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.bin/mpc/mpc-i3-playlists b/.bin/mpc/mpc-i3-playlists index 00456102..b51eecbd 100755 --- a/.bin/mpc/mpc-i3-playlists +++ b/.bin/mpc/mpc-i3-playlists @@ -11,5 +11,7 @@ if [ "$1" = "--clear" ]; then mpc clear fi mpc load $PLAYLIST -mpc play +if [[ "$(mpc)" != *"playing"* ]]; then + mpc play +fi notify-send -u low -t 5 -a 'Mopidy' "$PLAYLIST" "Beginning playback of playlist $PLAYLIST"