Fix invalid arg for
This commit is contained in:
parent
efaa668158
commit
0aaaaab7a0
|
@ -309,44 +309,26 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
{
|
{
|
||||||
_hasExited = true;
|
_hasExited = true;
|
||||||
|
|
||||||
DisposeLogStream();
|
_logFileStream?.Dispose();
|
||||||
|
_logFileStream = null;
|
||||||
|
|
||||||
try
|
var exitCode = process.ExitCode;
|
||||||
|
|
||||||
|
_logger.LogInformation("FFMpeg recording exited with code {ExitCode} for {Path}", exitCode, _targetPath);
|
||||||
|
|
||||||
|
if (exitCode == 0)
|
||||||
{
|
{
|
||||||
var exitCode = process.ExitCode;
|
_taskCompletionSource.TrySetResult(true);
|
||||||
|
|
||||||
_logger.LogInformation("FFMpeg recording exited with code {ExitCode} for {path}", exitCode, _targetPath);
|
|
||||||
|
|
||||||
if (exitCode == 0)
|
|
||||||
{
|
|
||||||
_taskCompletionSource.TrySetResult(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_taskCompletionSource.TrySetException(new Exception(string.Format("Recording for {path} failed. Exit code {ExitCode}", _targetPath, exitCode)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch
|
else
|
||||||
{
|
{
|
||||||
_logger.LogError("FFMpeg recording exited with an error for {path}.", _targetPath);
|
_taskCompletionSource.TrySetException(
|
||||||
_taskCompletionSource.TrySetException(new Exception(string.Format("Recording for {path} failed", _targetPath)));
|
new Exception(
|
||||||
}
|
string.Format(
|
||||||
}
|
CultureInfo.InvariantCulture,
|
||||||
|
"Recording for {0} failed. Exit code {1}",
|
||||||
private void DisposeLogStream()
|
_targetPath,
|
||||||
{
|
exitCode)));
|
||||||
if (_logFileStream != null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
_logFileStream.Dispose();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error disposing recording log stream");
|
|
||||||
}
|
|
||||||
|
|
||||||
_logFileStream = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user