about summary refs log tree commit diff stats
path: root/src/watch
diff options
context:
space:
mode:
Diffstat (limited to 'src/watch')
-rw-r--r--src/watch/events.rs3
-rw-r--r--src/watch/mod.rs5
2 files changed, 3 insertions, 5 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"])?;
diff --git a/src/watch/mod.rs b/src/watch/mod.rs
index 374c1d7..815e208 100644
--- a/src/watch/mod.rs
+++ b/src/watch/mod.rs
@@ -16,7 +16,6 @@ use log::{debug, info, warn};
 use crate::{
     app::App,
     cache::maintain,
-    constants::{mpv_config_path, mpv_input_path},
     storage::video_database::{extractor_hash::ExtractorHash, getters::get_videos, VideoStatus},
 };
 
@@ -41,7 +40,7 @@ pub async fn watch(app: &App) -> Result<()> {
         Ok(())
     })?;
 
-    let config_path = mpv_config_path()?;
+    let config_path = &app.config.paths.mpv_config_path;
     if config_path.try_exists()? {
         info!("Found mpv.conf at '{}'!", config_path.display());
         mpv.execute(
@@ -55,7 +54,7 @@ pub async fn watch(app: &App) -> Result<()> {
         );
     }
 
-    let input_path = mpv_input_path()?;
+    let input_path = &app.config.paths.mpv_input_path;
     if input_path.try_exists()? {
         info!("Found mpv.input.conf at '{}'!", input_path.display());
         mpv.execute(