From ff13b56163dcc231be4d5ac9c60ce21ecea1d948 Mon Sep 17 00:00:00 2001 From: Matthias Ahouansou <matthias@ahouansou.cz> Date: Fri, 28 Feb 2025 15:50:40 +0000 Subject: [PATCH] move hard-coded arguments to default config, allowing them to be overwritten they don't seem to really do much, and can cause problems when using umpv as the command --- Cargo.lock | 4 ++-- src/command.rs | 2 -- src/config.rs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2099e4a..8ab3b6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "equivalent" @@ -10,7 +10,7 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "ff2mpv-rust" -version = "1.1.4" +version = "1.1.5" dependencies = [ "serde", "serde_json", diff --git a/src/command.rs b/src/command.rs index 5508bc1..7e77966 100644 --- a/src/command.rs +++ b/src/command.rs @@ -87,9 +87,7 @@ impl Command { command.stdout(process::Stdio::null()); command.stderr(process::Stdio::null()); - command.arg("--no-terminal"); command.args(args); - command.arg("--"); command.arg(url); Command::detach_mpv(&mut command); diff --git a/src/config.rs b/src/config.rs index 096d860..67eba67 100644 --- a/src/config.rs +++ b/src/config.rs @@ -17,7 +17,7 @@ impl Default for Config { fn default() -> Self { Self { player_command: "mpv".to_owned(), - player_args: vec![], + player_args: vec![String::from("--no-terminal"), String::from("--")], } } }