From 7dc1f2d302b176dc11d2680d7a0fd8d710da6e23 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 15 Jul 2025 07:13:43 +0200 Subject: feat(crates/yt/watch): Make the time between watch progress saves configurable --- crates/yt/src/config/mod.rs | 3 +++ crates/yt/src/watch/mod.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/yt/src/config/mod.rs b/crates/yt/src/config/mod.rs index 756a7f5..adbafdd 100644 --- a/crates/yt/src/config/mod.rs +++ b/crates/yt/src/config/mod.rs @@ -40,6 +40,9 @@ mk_config! { /// How many chars to display at most, when displaying information on mpv's local on screen /// display. local_displays_length: usize =: 1000, + + /// How long to wait between saving the video watch progress. + watch_progress_save_intervall: Duration =: Duration::from_secs(10), }, paths: PathsConfig = { /// Where to store downloaded files. diff --git a/crates/yt/src/watch/mod.rs b/crates/yt/src/watch/mod.rs index 8c7d6f8..2fe34b2 100644 --- a/crates/yt/src/watch/mod.rs +++ b/crates/yt/src/watch/mod.rs @@ -227,7 +227,7 @@ pub(crate) async fn watch(app: Arc, provide_ipc_socket: bool, headless: boo if provide_ipc_socket { fs::remove_file(&app.config.paths.mpv_ipc_socket_path).with_context(|| { format!( - "Failed to clean-up the mpve ipc socket at {}", + "Failed to clean-up the mpv ipc socket at {}", app.config.paths.mpv_ipc_socket_path.display() ) })?; -- cgit 1.4.1