notandy / ympd

Standalone MPD Web GUI written in C, utilizing Websockets and Bootstrap/JS
http://www.ympd.org
GNU General Public License v2.0
517 stars 144 forks source link

Allow MPD Password to be configured in command line options #148

Closed faithanalog closed 6 years ago

faithanalog commented 7 years ago

I've been frequently annoyed when I restart my server and I have to re-enter my MPD password in YMPD, so I added an option to configure it on startup. While this does mean the password is stored on disk, for something like MPD this isn't really a big problem as long as you're not using a password you use elsewhere.

d3xt3r01 commented 7 years ago

For some reason, I get a segmentation fault when using the -m param

faithanalog commented 7 years ago

Interesting, I'll take a look. I use the long option on my server, so I may have done the short option incorrectly.

On Mar 29, 2017 07:00, "Adrian Sandu" notifications@github.com wrote:

For some reason, I get a segmentation fault when using the -m param

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/notandy/ympd/pull/148#issuecomment-290056123, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUz7cdgVRaJeJFyhUFe7j_BXPCr00vvks5rqjm1gaJpZM4Mqrdj .

faithanalog commented 7 years ago

@d3xt3r01 I didn't understand the formatting of the optstring passed to getopt_long. Read up on it, and -m should be fixed now.

d3xt3r01 commented 7 years ago

@unknownloner +1 ! Works fine now. Thanks.

SuperBFG7 commented 6 years ago

This breaks the ympd start using the provided service file in case of an empty password

notandy commented 6 years ago

Thanks, should work now with empty password

SuperBFG7 commented 6 years ago

No, or at leas not what I meant: putting --mpdpass "$MPD_PASSWORD" in the service file makes ympd think the next argument is the password if $MPD_PASSWORDis empty.

tallmtt commented 1 week ago

Is how to configure ympd when mpd uses a password in any documentation outside of this forum?