Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
Revert "Set InvariantCulture for VOD times"
Browse files Browse the repository at this point in the history
This reverts commit db5b81a.
  • Loading branch information
lay295 committed Jan 16, 2021
1 parent db5b81a commit 5c1229b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion TwitchDownloaderCore/TwitchDownloaderCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>Lewis Pardo</Authors>
<Version>1.0.8</Version>
<Version>1.0.7</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
30 changes: 14 additions & 16 deletions TwitchDownloaderCore/VideoDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,28 +207,26 @@ await Task.Run(() =>

await Task.Run(() =>
{
progress.Report(new ProgressReport() { reportType = ReportType.Log, data = "Ffmpeg Path: " + downloadOptions.FfmpegPath });
progress.Report(new ProgressReport() { reportType = ReportType.Log, data = "Input File: " + Path.Combine(downloadFolder, "output.ts") });
progress.Report(new ProgressReport() { reportType = ReportType.Log, data = "Output File: " + Path.GetFullPath(downloadOptions.Filename) });
var process = new Process
try
{
StartInfo =
var process = new Process
{
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(CultureInfo.InvariantCulture), Int32.MaxValue, seekDuration.ToString(CultureInfo.InvariantCulture), 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(), Int32.MaxValue, seekDuration.ToString(), Path.GetFullPath(downloadOptions.Filename)),
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardInput = true,
RedirectStandardOutput = true,
RedirectStandardError = true
RedirectStandardInput = false,
RedirectStandardOutput = false,
RedirectStandardError = false
}
};
process.ErrorDataReceived += ((object sender, DataReceivedEventArgs e) => { progress.Report(new ProgressReport() { reportType = ReportType.Log, data = e.Data }); });

process.Start();
process.BeginErrorReadLine();
process.BeginOutputReadLine();
process.WaitForExit();
};
process.Start();
process.WaitForExit();
}
catch (TaskCanceledException) { }
Cleanup(downloadFolder);
});
}
catch
Expand Down

0 comments on commit 5c1229b

Please sign in to comment.