librespot-org / librespot

Open Source Spotify client library
MIT License
4.46k stars 540 forks source link

add flag to display connect device as group #1302

Closed JoeyEamigh closed 2 weeks ago

JoeyEamigh commented 2 weeks ago

This PR adds support for the groupStatus flag of the Spotify ZeroConf API and a flag in the CLI to set it.

Motivation: This allows differentiating between single and group devices when you have multiple Librespot instances or Connect devices on your network.

Notes: The ZeroConf docs show GROUP and NONE as valid options for groupStatus. There was no obvious short flag to set for the new group flag, so no short flag was set.

Verifying: The new example at discovery/discovery_group.rs. The command cargo run -- --name "Librespot Group" --group.

Example: image

Let me know if you would like any changes!

roderickvd commented 2 weeks ago

Looks great to me! Unless there are any other comments, good to merge.