about summary refs log tree commit diff stats
path: root/src/watch/events.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-23 13:11:09 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-23 13:14:13 +0200
commit94c656ad40a7aae570e5a5fb61ad32632acc6d46 (patch)
tree269614af20caf10d76643c302e0115bd36fd2378 /src/watch/events.rs
parentrefactor(yt_dlp): Also move the `crates` subdirectory (diff)
downloadyt-94c656ad40a7aae570e5a5fb61ad32632acc6d46.tar.gz
yt-94c656ad40a7aae570e5a5fb61ad32632acc6d46.zip
feat(treewide): Use a configuration file
This allows use to avoid duplication of default values in the codebase
and obviously also facilitates changing these without having to
re-compile.
Diffstat (limited to '')
-rw-r--r--src/watch/events.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/watch/events.rs b/src/watch/events.rs
index adb35e5..df414ff 100644
--- a/src/watch/events.rs
+++ b/src/watch/events.rs
@@ -18,7 +18,6 @@ use tokio::process::Command;
 use crate::{
     app::App,
     comments::get_comments,
-    constants::LOCAL_COMMENTS_LENGTH,
     storage::video_database::{
         extractor_hash::ExtractorHash,
         getters::{get_video_by_hash, get_video_mpv_opts, get_videos},
@@ -213,7 +212,7 @@ impl MpvEventHandler {
                             .replace("\"", "")
                             .replace("'", "")
                             .chars()
-                            .take(LOCAL_COMMENTS_LENGTH)
+                            .take(app.config.watch.local_comments_length)
                             .collect();
 
                         mpv.execute("show-text", &[&format!("'{}'", comments), "6000"])?;