Address review comments

This commit is contained in:
Vasily 2019-10-16 16:13:59 +03:00
parent adccc18298
commit 6b6fede2e0
2 changed files with 5 additions and 4 deletions

View File

@ -543,6 +543,7 @@ namespace Emby.Server.Implementations.HttpServer
{
_logger.LogDebug("Sending HTTP Response 500 in response to {Url}", urlToLog);
}
stopWatch.Stop();
var elapsed = stopWatch.Elapsed;
if (elapsed.TotalMilliseconds > 500)

View File

@ -296,13 +296,13 @@ namespace MediaBrowser.Api.Playback
_ = new JobLogger(Logger).StartStreamingLog(state, process.StandardError.BaseStream, logStream);
// Wait for the file to exist before proceeeding
var waitFor = state.WaitForPath ?? outputPath;
Logger.LogDebug("Waiting for the creation of {0}", waitFor);
while (!File.Exists(waitFor) && !transcodingJob.HasExited)
var ffmpegTargetFile = state.WaitForPath ?? outputPath;
Logger.LogDebug("Waiting for the creation of {0}", ffmpegTargetFile);
while (!File.Exists(ffmpegTargetFile) && !transcodingJob.HasExited)
{
await Task.Delay(100, cancellationTokenSource.Token).ConfigureAwait(false);
}
Logger.LogDebug("File {0} created or transcoding has finished", waitFor);
Logger.LogDebug("File {0} created or transcoding has finished", ffmpegTargetFile);
if (state.IsInputVideo && transcodingJob.Type == TranscodingJobType.Progressive && !transcodingJob.HasExited)
{