moOde MPD Tweaks GUI

2020-09-14 The upcoming 7.0.0 release of moOde contains another patch of me, that will make the one below obsolete.

The moOde Audio Player MPD configuration only support a very small subset of the available MPD options. The one that are supported comes with a very nice user interface. Only sometimes I just want to try unsupported or even new MPD options.

Just editing the mpd.conf isn’t an option, because Moode will overwrite the configuration file. You can work around it by modifying the Moode MPD configuration generator. But that isn’t very flexible. This article provide a patch to make experimenting with MPD a little bit easier by using the web interface of Moode.

On the bottom of the MPD configuration page an MPD Tweaks section is added.

When enabled two text input boxes are shown:

One for general parameters and one for the default output device. It doesn’t provide a very rich interface, but it beats changing the MPD configuration generator by hand. Multiple options can be set separated by ‘;’.

When the tweaks are disabled, the settings are still kept in the database only it isn’t used. This makes it easier switch on and off the settings.

Any parameter added to the MPD Tweaks General or Device parameters will override any parameter set by Moode it self.

In the final generated MPD.conf it is shown which parameters are coming from the MPD Tweaks settings:

Install the MDP Tweaks Patch

wget https://www.bitlab.nl/wp-content/uploads/2020/04/moode_mpd_tweaks.patch
wget https://www.bitlab.nl/wp-content/uploads/2020/04/moode_mpd_tweaks.sql
cd /var/www
sudo patch -b -p2 < /home/pi/moode_mpd_tweaks.patch
sqlite3 /var/local/www/db/moode-sqlite3.db < /home/pi/moode_mpd_tweaks.sql
sudo systemctl restart php7.3-fpm

Or if you want to download the patches yourself:

All due the patch is installed, it is still hidden from the user. We need to unlock it by setting a field in the database like:

$ sqlite3 /var/local/www/db/moode-sqlite3.db 'UPDATE cfg_mpd  SET value="1" where param="mpd_tweaks_unlock";'

Usage

Go to the MPD configure page and on the bottom you will find the MPD tweak. Default it is disabled.

To enabled it:

  • change the toggle button to on
  • press the set button next to it

Now the additional text input for general and device parameters should be present:

Enter the configuration parameters separated by “;”. See the original MPD documentation for the available parameters.

For example adding log_level "verbose" general parameters adds message to the /var/log/mp/log file.

Leave a Reply

Your email address will not be published.