From 253db50c64391364ba3ec8a7ee50a37b0334d9bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert=20G=C3=BCnzler?= <r@gnzler.io>
Date: Mon, 13 Apr 2026 19:59:20 +0900
Subject: [PATCH 1/2] remove mpd dependency
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Robert Günzler <r@gnzler.io>
---
 impd | 22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

diff --git a/impd b/impd
index 9734577..226988d 100755
--- a/impd
+++ b/impd
@@ -1014,22 +1014,7 @@ archive() {
 }
 
 reshuffle() {
-	if ! is_installed mpc; then
-		echo "Error: mpc is not installed." >&2
-		return 1
-	fi
-	if ! pgrep -x mpd >/dev/null; then
-		echo "Error: mpd is not running." >&2
-		return 1
-	fi
-
-	mpc update "$program/$current"
-	mpc crop || true
-	mpc add "$program/$current"
-	mpc shuffle
-	if ! "${silent:-false}"; then
-		mpc play
-	fi
+	mkplaylist
 }
 
 rotate() {
@@ -1081,8 +1066,7 @@ mkplaylist() {
 }
 
 grep_mpd_dir() {
-	# https://wiki.archlinux.org/index.php/Music_Player_Daemon#Configuration
-	grep -Pos 'music_directory\s*"?\K[^"]*(?="?)' -- ~/.config/mpd/mpd.conf
+	:
 }
 
 find_xdg_music_dir() {
@@ -1114,7 +1098,7 @@ choose_mpd_dir() {
 set_impd_dir() {
 	local dir
 	if ! [[ -d ${dir:=$(choose_mpd_dir)} ]]; then
-		echo "Couldn't detect the mpd directory."
+		echo "Couldn't detect the target directory."
 		exit 1
 	fi
 	readonly immersionpod_dir=$dir/$program
-- 
2.52.0

