Skip to content
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

Show supported features in --version #1255

Open
redfast00 opened this issue Jan 5, 2024 · 4 comments · May be fixed by #1312
Open

Show supported features in --version #1255

redfast00 opened this issue Jan 5, 2024 · 4 comments · May be fixed by #1312
Labels
enhancement A new feature that would improve Spotifyd good first issue An easy to implement issue, good for first time contributors or people new to open source

Comments

@redfast00
Copy link

Currently, spotifyd --version only shows:

spotifyd 0.3.5

it would be nice if it also listed if this is an official release, and which options it was (and wasn't compiled with), so for example

spotifyd 0.3.5
slim
NO mpris support
...
@redfast00 redfast00 added the enhancement A new feature that would improve Spotifyd label Jan 5, 2024
@eladyn
Copy link
Member

eladyn commented Jan 6, 2024

Sounds like a good idea. Would you be happy with something like:

spotifyd 0.3.5
features: MPRIS, keyring
audio backends: alsa, pulseaudio, rodio

That should be quite easy to implement. I'm not sure about the official release part. Is there a specific reason, you would like to see it in there?

@eladyn eladyn added the good first issue An easy to implement issue, good for first time contributors or people new to open source label Jan 6, 2024
@redfast00
Copy link
Author

Sounds good! Is it possible to also list the features it was not compiled with maybe? If not, no worries.

As for the official release part: does not really matter to me but seemed useful, although I can't remember the usecase anymore now.

@redfast00 redfast00 changed the title Show release build type in --version (slim, full, default) Show supported features in --version Jan 12, 2024
@Tritium55
Copy link

Is this issue still open? If yes, how can I start on it?

@eladyn
Copy link
Member

eladyn commented Nov 16, 2024

Thank you for your interest! Sure, any help is greatly appreciated. Currently, all CLI config parsing is done by structopt, see the following lines for the big config struct:

spotifyd/src/config.rs

Lines 335 to 361 in b25538f

#[derive(Debug, Default, StructOpt)]
#[structopt(
about = "A Spotify daemon",
author,
name = "spotifyd",
setting(AppSettings::ColoredHelp)
)]
pub struct CliConfig {
/// The path to the config file to use
#[structopt(long, value_name = "string")]
pub config_path: Option<PathBuf>,
/// If set, starts spotifyd without detaching
#[structopt(long)]
pub no_daemon: bool,
/// Prints more verbose output
#[structopt(long)]
pub verbose: bool,
/// Path to PID file.
#[structopt(long)]
pub pid: Option<PathBuf>,
#[structopt(flatten)]
pub shared_config: SharedConfigValues,
}

So the --version is auto-generated and can maybe be changed with some options in the #[structopt(...)] block above.

If you need some further hints, where to look, feel free to join the matrix. I try to be somewhat responsive there and help where I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature that would improve Spotifyd good first issue An easy to implement issue, good for first time contributors or people new to open source
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants