From f57649eea93be1eedef55aee9c89302e3d636b89 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 6 Jan 2017 01:30:22 -0500 Subject: [PATCH] shell/mpd/bin/cleanup-music.sh: get playlist dir from mpd.conf --- shell/mpd/bin/cleanup-music.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/mpd/bin/cleanup-music.sh b/shell/mpd/bin/cleanup-music.sh index 27261f64..66f3c985 100755 --- a/shell/mpd/bin/cleanup-music.sh +++ b/shell/mpd/bin/cleanup-music.sh @@ -5,7 +5,9 @@ set -e -playlistfile=$HOME/music/.db/playlists/delete-pls.m3u +playlistdir="$(grep playlist_directory $HOME/.config/mpd/mpd.conf | awk '{ print $2; }')" +playlistdir="${playlistdir//\"/}" +playlistfile="$playlistdir/1-star.m3u" songs=$(<"$playlistfile") # Delete designated songs