Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.
feat: add Windows VLC support, optimize event loop
Samir Hossainsc6db39d14454
diff --git a/src/tui/app.rs b/src/tui/app.rsindex ba4bbf1..97f9571 100644--- a/src/tui/app.rs+++ b/src/tui/app.rs@@ -2439,6 +2439,10 @@ impl App {crate::tui::state::PlayerKind::Vlc => {let mut c = if std::path::Path::new("/Applications/VLC.app").exists() {std::process::Command::new("/Applications/VLC.app/Contents/MacOS/VLC")+ } else if std::path::Path::new("C:\\Program Files\\VideoLAN\\VLC\\vlc.exe").exists() {+ std::process::Command::new("C:\\Program Files\\VideoLAN\\VLC\\vlc.exe")+ } else if std::path::Path::new("C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe").exists() {+ std::process::Command::new("C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe")} else {std::process::Command::new("vlc")};diff --git a/src/tui/event.rs b/src/tui/event.rsindex f751788..50bdf3d 100644--- a/src/tui/event.rs+++ b/src/tui/event.rs@@ -36,8 +36,9 @@ impl EventHandler {Ok(CrosstermEvent::Resize(_, _)) => {}_ => {}}+ } else {+ tokio::time::sleep(Duration::from_millis(10)).await;}- tokio::task::yield_now().await;}});