librespot
librespot copied to clipboard
Document configuration via environment variables in the wiki
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.
True. Would you add the documentation? The wiki is editable by everyone.
Yep I will do it. I didn't notice the edit option.
Great stuff. Feel free to close this issue when you're done.
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)
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.
Thanks 👍