diff options
Diffstat (limited to 'src/watch/mod.rs')
-rw-r--r-- | src/watch/mod.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/watch/mod.rs b/src/watch/mod.rs index 815e208..9eb1c18 100644 --- a/src/watch/mod.rs +++ b/src/watch/mod.rs @@ -77,11 +77,6 @@ pub async fn watch(app: &App) -> Result<()> { play_things.len() ); - // There is nothing to watch - if play_things.len() == 0 { - return Ok(()); - } - let mut playlist_cache: Vec<ExtractorHash> = Vec::with_capacity(play_things.len()); for play_thing in play_things { @@ -100,6 +95,8 @@ pub async fn watch(app: &App) -> Result<()> { let mut mpv_event_handler = MpvEventHandler::from_playlist(playlist_cache); loop { + while mpv_event_handler.check_idle(&app, &mpv).await? {} + if let Some(ev) = ev_ctx.wait_event(600.) { match ev { Ok(event) => { |