-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
merge cli and config flags #283
Conversation
This commit switched up the nesting order of the different config structs, allowing some code be to cleaned up. Additionally, a logging entry has been added to log the final used config before launching the daemon. This will make debugging and helping out on problems a little bit easier. Special care has been taken to not log the user's password.
This commit adds support for the zeroconf_port provided by librespot. It is now possible to pin down the port for the Spotify Connect discovery service.
I think I got everything done. Would be nice if you could take a look and give an OK @simonpersson :) Ups, just noticed that I actually do not check for the |
This commit adds the serde default flag to the FileConfig. This allows the two boolean flags to be optional instead of required.
Thank you for this! I have been away from my computer for some time, so I wasn't able to review it for you. Looks like a great improvement :) |
This PR merges the CLI and config options into one common struct to prevent different naming schemes. As far as I can tell, the change is fully backwards compatible thanks to clap's and serde's
alias
keywords.I basically only changed the parsing logic, the outer interface is still the same (
SpotifydConfig
).CLI arguments take priority over config arguments. They are merged together during load. In theory, different file formats other than INI could be supported but I opted out of this one for now. I had to re-declare
librespot
enums likeBitrate
to add help text to them.The following keys have changed (the old keys could be removed in a breaking change later on):
The idea behind the last one was to add more unified hooks later on (like
on-login-hook
oron-device-connected-hook
, meaning that people can create more custom scripts to show notifications or do other stuff).I still need to clean up the code as I can re-arrange a lot of stuff to make it more readable.
Creating the PR so you guys know that someone is working on it :)
The following things still need to be done:
The PR will, after completion, affect the following issues:
Closes #233.
Closes #265.