mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 06:21:23 +00:00
use device name instead of node id to get audio device
This commit is contained in:
@@ -44,13 +44,8 @@ pub fn parse_command(request: &Request) -> Option<Box<dyn Executable + Send>> {
|
||||
"get_input" => Some(Box::new(GetCurrentInputCommand {})),
|
||||
"get_inputs" => Some(Box::new(GetAllInputsCommand {})),
|
||||
"set_input" => {
|
||||
let id = request
|
||||
.args
|
||||
.get("input_id")
|
||||
.unwrap_or(&String::new())
|
||||
.parse::<u32>()
|
||||
.ok();
|
||||
Some(Box::new(SetCurrentInputCommand { id }))
|
||||
let name = Some(request.args.get("input_name").unwrap_or(&String::new())).cloned();
|
||||
Some(Box::new(SetCurrentInputCommand { name }))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user