From: Stephen Seo Date: Mon, 20 Sep 2021 11:45:07 +0000 (+0900) Subject: Fix sleeping on polling album art X-Git-Tag: 0.1.0~6 X-Git-Url: https://git.seodisparate.com/stephenseo/css/base.css?a=commitdiff_plain;h=92f2a441a4421e0772f195b9ec1b6a2e4fe1321c;p=mpd_info_screen Fix sleeping on polling album art --- diff --git a/src/main.rs b/src/main.rs index d6d657e..43ea317 100644 --- a/src/main.rs +++ b/src/main.rs @@ -533,7 +533,9 @@ fn info_loop(shared_data: Arc>) -> Result<(), String> { //println!("poll_state == {:?}, skipping write...", poll_state); } - thread::sleep(Duration::from_millis(50)); + if poll_state != PollState::ReadPicture && poll_state != PollState::ReadPictureInDir { + thread::sleep(Duration::from_millis(50)); + } } Ok(()) }