Skip to content

Commit

Permalink
fix media provider for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zzeneg committed Jan 1, 2025
1 parent 7803b63 commit 4d74b55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion install-build-deps.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env bash

sudo apt update --quiet --yes

sudo apt --quiet --yes install \
libudev-dev pulseaudio libdbus-1-dev
libudev-dev pulseaudio libdbus-1-dev libx11-dev
7 changes: 6 additions & 1 deletion src/providers/media/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ fn send_data(data_type: DataType, value: &String, data_sender: &broadcast::Sende
data.truncate(30);
data.insert(0, data.len() as u8);
data.insert(0, data_type as u8);
data_sender.send(data).unwrap();
if let Err(e) = data_sender.send(data) {
tracing::error!("Can not send data: {}", e);
}

// short delay to separate title/artist data
std::thread::sleep(std::time::Duration::from_millis(10));
}

pub struct MediaProvider {
Expand Down

0 comments on commit 4d74b55

Please sign in to comment.