diff --git a/interfaces/main.ui b/interfaces/main.ui
index 8167416..ff2461c 100644
--- a/interfaces/main.ui
+++ b/interfaces/main.ui
@@ -1,25 +1,22 @@
-
+
diff --git a/src/main.rs b/src/main.rs
index 3a81362..7079841 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -132,22 +132,27 @@ fn main() {
// get audio sources
let sources_descriptions: Vec = {
+ let list_sources_child = Command::new("pactl")
+ .args(&["list", "sources"])
+ .stdout(Stdio::piped())
+ .spawn();
let sources_descriptions = String::from_utf8(
+ if list_sources_child.is_ok() {
Command::new("grep")
.args(&["-e", "device.description"])
.stdin(
- Command::new("pactl")
- .args(&["list", "sources"])
- .stdout(Stdio::piped())
- .spawn()
- .unwrap()
- .stdout
- .take()
- .unwrap(),
+ list_sources_child
+ .unwrap()
+ .stdout
+ .take()
+ .unwrap(),
)
.output()
.unwrap()
- .stdout,
+ .stdout
+ } else {
+ Vec::new()
+ }
)
.unwrap();
sources_descriptions
diff --git a/test.ogg b/test.ogg
new file mode 100644
index 0000000..ac1e829
Binary files /dev/null and b/test.ogg differ