Merge pull request #1685 from Bond-009/format

Fix invalid arg for
pull/1687/head
Anthony Lavado 5 years ago committed by GitHub
commit a30876c3ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -309,13 +309,12 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
{ {
_hasExited = true; _hasExited = true;
DisposeLogStream(); _logFileStream?.Dispose();
_logFileStream = null;
try
{
var exitCode = process.ExitCode; var exitCode = process.ExitCode;
_logger.LogInformation("FFMpeg recording exited with code {ExitCode} for {path}", exitCode, _targetPath); _logger.LogInformation("FFMpeg recording exited with code {ExitCode} for {Path}", exitCode, _targetPath);
if (exitCode == 0) if (exitCode == 0)
{ {
@ -323,30 +322,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
} }
else else
{ {
_taskCompletionSource.TrySetException(new Exception(string.Format("Recording for {path} failed. Exit code {ExitCode}", _targetPath, exitCode))); _taskCompletionSource.TrySetException(
} new Exception(
} string.Format(
catch CultureInfo.InvariantCulture,
{ "Recording for {0} failed. Exit code {1}",
_logger.LogError("FFMpeg recording exited with an error for {path}.", _targetPath); _targetPath,
_taskCompletionSource.TrySetException(new Exception(string.Format("Recording for {path} failed", _targetPath))); exitCode)));
}
}
private void DisposeLogStream()
{
if (_logFileStream != null)
{
try
{
_logFileStream.Dispose();
}
catch (Exception ex)
{
_logger.LogError(ex, "Error disposing recording log stream");
}
_logFileStream = null;
} }
} }

Loading…
Cancel
Save