From 663ad92768970d23807fc93e4637a94a95039149 Mon Sep 17 00:00:00 2001 From: druffko Date: Wed, 5 Feb 2025 20:52:59 +0100 Subject: [PATCH] fix: overwrite flag --- FFMP.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/FFMP.cs b/FFMP.cs index 12011d2..f2a5a9f 100644 --- a/FFMP.cs +++ b/FFMP.cs @@ -245,7 +245,9 @@ static async Task ProcessFile(string inputFile, Options options, string[] ffmpeg } // Build FFmpeg arguments - var arguments = $"-i \"{Path.GetFullPath(inputFile)}\""; + var arguments = options.Overwrite ? "-y " : ""; + arguments += $"-i \"{Path.GetFullPath(inputFile)}\""; + if (options.Convert) { arguments += $" \"{outputFile}\"";