Hi,
it seems MPD automatically starts playing after boot, even if it was paused/stopped before.
Note: I'm switching it off without shutdown command.
by Midnight » 22 Mar 2014, 17:40
by dopus » 22 Mar 2014, 19:00
by tc-fi » 23 Mar 2014, 13:59
by Midnight » 23 Mar 2014, 14:13
by junaling » 17 Apr 2014, 22:06
by Midnight » 05 Jun 2014, 15:41
junaling wrote:This happens to me when I do a shutdown through ssh while still playing, however if I stop/pause the current song before issuing the shutdown it does not.
state_file "/var/lib/mpd/mpdstate"
by LosHermanos » 12 Jul 2014, 09:01
by Midnight » 16 Jul 2014, 17:24
Midnight wrote:Maybe there should be an option to disable the state file completely.
by waves » 18 Jan 2015, 00:36
by daymz » 23 Jul 2015, 02:43
#!/bin/sh
# Modify MPD's state file to ensure current state is "pause"
sed -i 's/^\(state: \).*/\1pause/' /var/lib/mpd/mpdstate
[Unit]
Description=Music Player Daemon
After=network.target sound.target
[Service]
ExecStartPre=/home/user/mpd_state_pause
ExecStart=/usr/bin/mpd --no-daemon
[Install]
WantedBy=multi-user.target
sndusb_profile() {
local "${@}"
mpc pause > /dev/null 2>&1
sleep 0.3
modprobe -r snd-usb-audio
echo "options snd-usb-audio nrpacks=${nrpacks}" > /etc/modprobe.d/modprobe.conf
sleep 0.2
modprobe snd-usb-audio
sleep 0.5
#mpc play > /dev/null 2>&1
#mpc pause > /dev/null 2>&1
#######mpc play > /dev/null 2>&1
}
support RuneAudio