GioF71 / mpd-alsa-docker

Easily run mpd with Alsa or PulseAudio output with Docker. Upsampling 2x 4x 8x with "Goldilocks" settings by Archimago. Scrobbling support.
Apache License 2.0
18 stars 5 forks source link

Is it possible to add... #397

Closed bonelifer closed 2 months ago

bonelifer commented 2 months ago

Is it possible to add this to mpd.conf: auto_update "yes" Assuming that only causes mpd to pick up new changes and not a total update.

GioF71 commented 2 months ago

Added support for auto_update_depth while I were at it. You need to add variable:

AUTO_UPDATE="yes"

for the feature you wanted to have. Let me know if this works. Images are building right now.

bonelifer commented 2 months ago

I'll try this once the docker image updates, didn't work when I did docker pull, so I assume it isnt done propogating/building. Got an error saying "AUTO_UPDATE="yes"" wasn't recognized and mpd never started,

GioF71 commented 2 months ago

The images have been built in a few minutes so I don't think that is the real issue. Which tag are you using?

GioF71 commented 2 months ago

Sorry I mislead you, can you try without the quotes? So AUTO_UPDATE=yes

GioF71 commented 2 months ago

Reopening, until we verify it's ok

bonelifer commented 2 months ago

It no longer complains about it. Doesn't show up in mympd or MPDroid. Don't see it in the log file. Also the log file probably from the mpd.conf, has the characters below. Making gui text editors refuse to open it thinking it's a binary.

^A^@^@^@^@^@^@

Had to use this to open this in pluma:

#!/bin/bash

# This script removes the pattern ^A^@^@^@^@^@^@ from a file using sed.

# Check if the file path is provided as an argument
if [ $# -ne 1 ]; then
    echo "Usage: $0 <file>"
    exit 1
fi

file="$1"

# Use sed to remove the specified pattern from the file
sed -i 's/\x01\x00\x00\x00\x00\x00\x00//g' "$file"
GioF71 commented 2 months ago

I saw a few mail but cannot find anything of that in the issue, maybe you deleted some posts? Anyway in those email it looks like there was a "$" missing before the "{". It should be

      - AUTO_UPDATE=${AUTO_UPDATE:-yes}
      - ENFORCE_PLAYER_STATE=${ENFORCE_PLAYER_STATE=:-no}

instead of

      - AUTO_UPDATE={AUTO_UPDATE:-yes}
      - ENFORCE_PLAYER_STATE={ENFORCE_PLAYER_STATE=:-no}

Let me know if this helps

GioF71 commented 2 months ago

You should edit those files directly on the machine with vi or nano... A conveniente alternative is to open vscode on your desktop computer and connect to the pi with ssh using the "Remote" extenstion. Editing becomes much easier

bonelifer commented 2 months ago

Yes, I deleted, Sorry about that, after I noticed the things you just pointed out. AUTO_UPDATE, seems to work now. I assume the other one works as well. I have one more problem, for another issue. Thanks for the help.

GioF71 commented 2 months ago

Kind of imagined but I wanted to be sure... :-) Please star the repo if you like the work, that is always very encouraging. Have a nice day!