diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nixpkgs/pkgs/ytc/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nixpkgs/pkgs/ytc/src/main.rs b/sys/nixpkgs/pkgs/ytc/src/main.rs index eccd3c2c..552e85d3 100644 --- a/sys/nixpkgs/pkgs/ytc/src/main.rs +++ b/sys/nixpkgs/pkgs/ytc/src/main.rs @@ -151,10 +151,10 @@ fn main() -> Result<()> { let status = mpv.status().context("Failed to run mpv")?; if let Some(code) = status.code() { - if let Some(id) = id { - if code == 0 { + if code == 0 { + fs::remove_file(&path)?; + if let Some(id) = id { println!("\x1b[32;1mMarking {} as watched!\x1b[0m", id); - fs::remove_file(&path)?; let mut ytcc = StdCmd::new("ytcc"); ytcc.stdout(stdout()); ytcc.stderr(stderr()); |