MPD status command line - MiczFlor/RPi-Jukebox-RFID GitHub Wiki
This is a collection of command line solutions to get the status of the MPD (music player daemon). They need more commenting. Please add if you find anything in the code or in the wild...
Here the rough list and where they were taken from:
htdocs/ajax.loadMPDStatus.php
systemctl status mpd |grep 'Active: '|sed 's/Active: //g'
htdocs/inc.playerStatus.php
Get status and current track details.
echo 'status\ncurrentsong\nclose' | nc -w 1 localhost 6600
File names of all tracks in the loaded playlist.
echo 'playlistinfo\nclose' | nc -w 1 localhost 6600