Skip to content

Commit 9708088

Browse files
committed
Set InvariantCulture for VOD times
1 parent 5c1229b commit 9708088

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

TwitchDownloaderCore/VideoDownloader.cs

+6-11
Original file line numberDiff line numberDiff line change
@@ -207,26 +207,21 @@ await Task.Run(() =>
207207

208208
await Task.Run(() =>
209209
{
210-
try
210+
var process = new Process
211211
{
212-
var process = new Process
213-
{
214-
StartInfo =
212+
StartInfo =
215213
{
216214
FileName = downloadOptions.FfmpegPath,
217-
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)),
215+
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)),
218216
UseShellExecute = false,
219217
CreateNoWindow = true,
220218
RedirectStandardInput = false,
221219
RedirectStandardOutput = false,
222220
RedirectStandardError = false
223221
}
224-
};
225-
process.Start();
226-
process.WaitForExit();
227-
}
228-
catch (TaskCanceledException) { }
229-
Cleanup(downloadFolder);
222+
};
223+
process.Start();
224+
process.WaitForExit();
230225
});
231226
}
232227
catch

0 commit comments

Comments
 (0)