diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-07-15 07:13:43 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-07-15 07:13:43 +0200 |
commit | 7dc1f2d302b176dc11d2680d7a0fd8d710da6e23 (patch) | |
tree | 4bf3cdb6a10a1864bf2e6f9722cdee3a48c0a085 /crates | |
parent | refactor(crates/yt/config): Always use imported paths in config dec (diff) | |
download | yt-7dc1f2d302b176dc11d2680d7a0fd8d710da6e23.zip |
feat(crates/yt/watch): Make the time between watch progress saves configurable
Diffstat (limited to 'crates')
-rw-r--r-- | crates/yt/src/config/mod.rs | 3 | ||||
-rw-r--r-- | crates/yt/src/watch/mod.rs | 2 |
2 files changed, 4 insertions, 1 deletions
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<App>, 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() ) })?; |