about summary refs log tree commit diff stats
path: root/src/watch/mod.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/mod.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 'src/watch/mod.rs')
-rw-r--r--src/watch/mod.rs5
1 files changed, 2 insertions, 3 deletions
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(