@@ -203,6 +203,7 @@ fn get_setup() -> Setup {
203203 const CACHE_SIZE_LIMIT : & str = "cache-size-limit" ;
204204 const DEVICE : & str = "device" ;
205205 const DEVICE_TYPE : & str = "device-type" ;
206+ const DEVICE_IS_GROUP : & str = "group" ;
206207 const DISABLE_AUDIO_CACHE : & str = "disable-audio-cache" ;
207208 const DISABLE_CREDENTIAL_CACHE : & str = "disable-credential-cache" ;
208209 const DISABLE_DISCOVERY : & str = "disable-discovery" ;
@@ -409,6 +410,10 @@ fn get_setup() -> Setup {
409410 DEVICE_TYPE ,
410411 "Displayed device type. Defaults to speaker." ,
411412 "TYPE" ,
413+ ) . optflag (
414+ "" ,
415+ DEVICE_IS_GROUP ,
416+ "Whether the device represents a group. Defaults to false." ,
412417 )
413418 . optopt (
414419 TEMP_DIR_SHORT ,
@@ -1312,11 +1317,14 @@ fn get_setup() -> Setup {
13121317 } )
13131318 . unwrap_or_default ( ) ;
13141319
1320+ let is_group = opt_present ( DEVICE_IS_GROUP ) ;
1321+
13151322 let has_volume_ctrl = !matches ! ( mixer_config. volume_ctrl, VolumeCtrl :: Fixed ) ;
13161323
13171324 ConnectConfig {
13181325 name,
13191326 device_type,
1327+ is_group,
13201328 initial_volume,
13211329 has_volume_ctrl,
13221330 }
@@ -1685,6 +1693,7 @@ async fn main() {
16851693 match librespot:: discovery:: Discovery :: builder ( device_id, client_id)
16861694 . name ( setup. connect_config . name . clone ( ) )
16871695 . device_type ( setup. connect_config . device_type )
1696+ . is_group ( setup. connect_config . is_group )
16881697 . port ( setup. zeroconf_port )
16891698 . zeroconf_ip ( setup. zeroconf_ip . clone ( ) )
16901699 . launch ( )
0 commit comments