Add support for custom MPD music directory
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 2 Mar 2024 21:40:45 +0000 (16:40 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Tue, 28 May 2024 19:00:29 +0000 (15:00 -0400)
recipes-multimedia/musicpd/mpd_%.bbappend

index 8e65fd0..9b5c0e3 100644 (file)
@@ -28,6 +28,11 @@ do_install:append:rpi() {
 }
 
 do_install:append() {
+    if [ "${MPD_MUSIC_DIR}" != "" ]; then
+        sed -i -e 's:^\(music_directory\).*:\1 \"${MPD_MUSIC_DIR}\":g' \
+           ${D}/${sysconfdir}/mpd.conf
+    fi
+
     echo "zeroconf_enabled    \"yes\"" >> ${D}/${sysconfdir}/mpd.conf
     echo "zeroconf_name       \"Serveur Musique MPD\"" >> ${D}/${sysconfdir}/mpd.conf
     echo "audio_output {" >> ${D}/${sysconfdir}/mpd.conf