Fix style issues

This commit is contained in:
Mark Monteiro 2020-04-11 13:46:31 -04:00
parent 7152b55747
commit 4113288278
3 changed files with 35 additions and 34 deletions

View File

@ -293,7 +293,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
/// </summary> /// </summary>
private void OnFfMpegProcessExited(Process process, string inputFile) private void OnFfMpegProcessExited(Process process, string inputFile)
{ {
using (process) { using (process)
{
_hasExited = true; _hasExited = true;
_logFileStream?.Dispose(); _logFileStream?.Dispose();

View File

@ -159,18 +159,18 @@ namespace MediaBrowser.MediaEncoding.Attachments
int exitCode; int exitCode;
using (var process = new Process using (var process = new Process
{
StartInfo = new ProcessStartInfo
{ {
Arguments = processArgs, StartInfo = new ProcessStartInfo
FileName = _mediaEncoder.EncoderPath, {
UseShellExecute = false, Arguments = processArgs,
CreateNoWindow = true, FileName = _mediaEncoder.EncoderPath,
WindowStyle = ProcessWindowStyle.Hidden, UseShellExecute = false,
ErrorDialog = false CreateNoWindow = true,
}, WindowStyle = ProcessWindowStyle.Hidden,
EnableRaisingEvents = true ErrorDialog = false
}) },
EnableRaisingEvents = true
})
{ {
_logger.LogInformation("{File} {Arguments}", process.StartInfo.FileName, process.StartInfo.Arguments); _logger.LogInformation("{File} {Arguments}", process.StartInfo.FileName, process.StartInfo.Arguments);

View File

@ -429,18 +429,18 @@ namespace MediaBrowser.MediaEncoding.Subtitles
int exitCode; int exitCode;
using (var process = new Process using (var process = new Process
{
StartInfo = new ProcessStartInfo
{ {
CreateNoWindow = true, StartInfo = new ProcessStartInfo
UseShellExecute = false, {
FileName = _mediaEncoder.EncoderPath, CreateNoWindow = true,
Arguments = string.Format("{0} -i \"{1}\" -c:s srt \"{2}\"", encodingParam, inputPath, outputPath), UseShellExecute = false,
WindowStyle = ProcessWindowStyle.Hidden, FileName = _mediaEncoder.EncoderPath,
ErrorDialog = false Arguments = string.Format("{0} -i \"{1}\" -c:s srt \"{2}\"", encodingParam, inputPath, outputPath),
}, WindowStyle = ProcessWindowStyle.Hidden,
EnableRaisingEvents = true ErrorDialog = false
}) },
EnableRaisingEvents = true
})
{ {
_logger.LogInformation("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments); _logger.LogInformation("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
@ -582,18 +582,18 @@ namespace MediaBrowser.MediaEncoding.Subtitles
int exitCode; int exitCode;
using (var process = new Process using (var process = new Process
{
StartInfo = new ProcessStartInfo
{ {
CreateNoWindow = true, StartInfo = new ProcessStartInfo
UseShellExecute = false, {
FileName = _mediaEncoder.EncoderPath, CreateNoWindow = true,
Arguments = processArgs, UseShellExecute = false,
WindowStyle = ProcessWindowStyle.Hidden, FileName = _mediaEncoder.EncoderPath,
ErrorDialog = false Arguments = processArgs,
}, WindowStyle = ProcessWindowStyle.Hidden,
EnableRaisingEvents = true ErrorDialog = false
}) },
EnableRaisingEvents = true
})
{ {
_logger.LogInformation("{File} {Arguments}", process.StartInfo.FileName, process.StartInfo.Arguments); _logger.LogInformation("{File} {Arguments}", process.StartInfo.FileName, process.StartInfo.Arguments);