Switch from hardcoded value to provided constants

This commit is contained in:
GHOSCHT 2024-04-30 22:00:57 +02:00
parent d1eec7399a
commit 12b8a4c93b
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82

View file

@ -131,7 +131,10 @@ pub fn mute_sink_input(
.introspect()
.get_sink_input_info_list(move |items_result| match items_result {
pulse::callbacks::ListResult::Item(item) => {
let application_name = item.proplist.get_str("application.name").unwrap();
let application_name = item
.proplist
.get_str(pulse::proplist::properties::APPLICATION_NAME)
.unwrap();
let matches_regex = sink_filter.is_match(&application_name);
println!("{:?}", application_name);