aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/LiveTv
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-04-11 13:25:50 -0400
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-04-11 13:28:21 -0400
commit7152b55747f508e69bb6417bd583ba15c0e591a4 (patch)
tree1cc726470fb6d1a80efb03943c410f5a1035cebf /Emby.Server.Implementations/LiveTv
parent3d8501e462c1b4f9953444873e3ea64e085916a0 (diff)
Use a separate line for each property initializer
Diffstat (limited to 'Emby.Server.Implementations/LiveTv')
-rw-r--r--Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs21
-rw-r--r--Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs8
2 files changed, 18 insertions, 11 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
index 4d777081b..900f12062 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
@@ -1680,16 +1680,19 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
try
{
- var processStartInfo = new ProcessStartInfo
- {
- Arguments = GetPostProcessArguments(path, options.RecordingPostProcessorArguments),
- CreateNoWindow = true,
- ErrorDialog = false,
- FileName = options.RecordingPostProcessor,
- WindowStyle = ProcessWindowStyle.Hidden,
- UseShellExecute = false
+ var process = new Process
+ {
+ StartInfo = new ProcessStartInfo
+ {
+ Arguments = GetPostProcessArguments(path, options.RecordingPostProcessorArguments),
+ CreateNoWindow = true,
+ ErrorDialog = false,
+ FileName = options.RecordingPostProcessor,
+ WindowStyle = ProcessWindowStyle.Hidden,
+ UseShellExecute = false
+ },
+ EnableRaisingEvents = true
};
- var process = new Process { StartInfo = processStartInfo, EnableRaisingEvents = true };
_logger.LogInformation("Running recording post processor {0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
index 4738272be..29d17e2bb 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
@@ -90,9 +90,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
WindowStyle = ProcessWindowStyle.Hidden,
ErrorDialog = false
};
- _process = new Process { StartInfo = processStartInfo, EnableRaisingEvents = true };
- var commandLineLogMessage = _process.StartInfo.FileName + " " + _process.StartInfo.Arguments;
+ var commandLineLogMessage = processStartInfo.FileName + " " + processStartInfo.Arguments;
_logger.LogInformation(commandLineLogMessage);
var logFilePath = Path.Combine(_appPaths.LogDirectoryPath, "record-transcode-" + Guid.NewGuid() + ".txt");
@@ -104,6 +103,11 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
var commandLineLogMessageBytes = Encoding.UTF8.GetBytes(_json.SerializeToString(mediaSource) + Environment.NewLine + Environment.NewLine + commandLineLogMessage + Environment.NewLine + Environment.NewLine);
_logFileStream.Write(commandLineLogMessageBytes, 0, commandLineLogMessageBytes.Length);
+ _process = new Process
+ {
+ StartInfo = processStartInfo,
+ EnableRaisingEvents = true
+ };
_process.Exited += (sender, args) => OnFfMpegProcessExited(_process, inputFile);
_process.Start();