From 9708088fb6d687923b62c6e6220c22425b81ec3a Mon Sep 17 00:00:00 2001 From: lay295 Date: Fri, 15 Jan 2021 21:52:13 -0500 Subject: [PATCH] Set InvariantCulture for VOD times --- TwitchDownloaderCore/VideoDownloader.cs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/TwitchDownloaderCore/VideoDownloader.cs b/TwitchDownloaderCore/VideoDownloader.cs index 0c2a5645..93b27560 100644 --- a/TwitchDownloaderCore/VideoDownloader.cs +++ b/TwitchDownloaderCore/VideoDownloader.cs @@ -207,26 +207,21 @@ await Task.Run(() => await Task.Run(() => { - try + var process = new Process { - var process = new Process - { - StartInfo = + StartInfo = { FileName = downloadOptions.FfmpegPath, - Arguments = String.Format("-y -avoid_negative_ts make_zero " + (downloadOptions.CropBeginning ? "-ss {1} " : "") + "-i \"{0}\" -analyzeduration {2} -probesize {2} " + (downloadOptions.CropEnding ? "-t {3} " : "") + "-c:v copy \"{4}\"", Path.Combine(downloadFolder, "output.ts"), (seekTime - startOffset).ToString(), Int32.MaxValue, seekDuration.ToString(), Path.GetFullPath(downloadOptions.Filename)), + Arguments = String.Format("-y -avoid_negative_ts make_zero " + (downloadOptions.CropBeginning ? "-ss {1} " : "") + "-i \"{0}\" -analyzeduration {2} -probesize {2} " + (downloadOptions.CropEnding ? "-t {3} " : "") + "-c:v copy \"{4}\"", Path.Combine(downloadFolder, "output.ts"), (seekTime - startOffset).ToString(CultureInfo.InvariantCulture), Int32.MaxValue, seekDuration.ToString(CultureInfo.InvariantCulture), Path.GetFullPath(downloadOptions.Filename)), UseShellExecute = false, CreateNoWindow = true, RedirectStandardInput = false, RedirectStandardOutput = false, RedirectStandardError = false } - }; - process.Start(); - process.WaitForExit(); - } - catch (TaskCanceledException) { } - Cleanup(downloadFolder); + }; + process.Start(); + process.WaitForExit(); }); } catch