We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 150eb14 commit 058524dCopy full SHA for 058524d
src/audio_controllers/pulseaudio.rs
@@ -36,9 +36,18 @@ impl PulseBackend {
36
37
let applications = self.handler.list_applications().unwrap();
38
39
- for app in applications.clone() {
40
- if app.proplist.to_string().unwrap().to_lowercase().contains("songrec") {
41
- return Some(app.index);
+ let criteria: Vec<String> = vec![
+ format!("process.id = \"{}\"", std::process::id()),
+ "alsa plug-in [songrec]".to_string(),
42
+ "songrec".to_string(),
43
+ format!("{}", std::process::id())
44
+ ];
45
+
46
+ for criterion in criteria {
47
+ for app in applications.clone() {
48
+ if app.proplist.to_string().unwrap().to_lowercase().contains(&criterion) {
49
+ return Some(app.index);
50
+ }
51
}
52
53
None
0 commit comments