librespot icon indicating copy to clipboard operation
librespot copied to clipboard

Document configuration via environment variables in the wiki

Open b-errouane opened this issue 2 years ago • 3 comments

Librespot implements the usage of environment variables instead of CLI parameters for configuration. I only found out because I did go through the code. It would have been nice to have it documented here.

b-errouane avatar Sep 18 '22 19:09 b-errouane

True. Would you add the documentation? The wiki is editable by everyone.

roderickvd avatar Sep 18 '22 20:09 roderickvd

Yep I will do it. I didn't notice the edit option.

b-errouane avatar Sep 19 '22 11:09 b-errouane

Great stuff. Feel free to close this issue when you're done.

roderickvd avatar Sep 22 '22 19:09 roderickvd

It's documented in the change log. Any cli arg you can pass to librespot can also be passed as an env var by prefixing it with LIBRESPOT_, making it all caps and replacing any -'s with _'s. So option foo-bar becomes LIBRESPOT_FOO_BAR. You can also use that ability to create a makeshift config file of sorts if you're using systemd to daemonize it as I do in Raspotify. (That was my motivation for adding the feature)

JasonLG1979 avatar Sep 23 '22 19:09 JasonLG1979

Took some time because I had other things going on. I took the liberty to use @JasonLG1979 s comment as a basis for the wiki change.

b-errouane avatar Oct 12 '22 19:10 b-errouane

Thanks 👍

roderickvd avatar Oct 12 '22 19:10 roderickvd