await async functions

pull/798/head
Bond-009 6 years ago committed by Bond_009
parent ab0e851db9
commit da2caa2902

@ -234,7 +234,7 @@ namespace MediaBrowser.Api.Playback.Hls
// If the playlist doesn't already exist, startup ffmpeg // If the playlist doesn't already exist, startup ffmpeg
try try
{ {
ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, request.PlaySessionId, p => false); await ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, request.PlaySessionId, p => false);
if (currentTranscodingIndex.HasValue) if (currentTranscodingIndex.HasValue)
{ {
@ -258,7 +258,7 @@ namespace MediaBrowser.Api.Playback.Hls
job = ApiEntryPoint.Instance.OnTranscodeBeginRequest(playlistPath, TranscodingJobType); job = ApiEntryPoint.Instance.OnTranscodeBeginRequest(playlistPath, TranscodingJobType);
if (job.TranscodingThrottler != null) if (job.TranscodingThrottler != null)
{ {
job.TranscodingThrottler.UnpauseTranscoding(); await job.TranscodingThrottler.UnpauseTranscoding();
} }
} }
} }

@ -102,9 +102,9 @@ namespace MediaBrowser.Api.Playback.Hls
return GetFileResult(file, file); return GetFileResult(file, file);
} }
public void Delete(StopEncodingProcess request) public Task Delete(StopEncodingProcess request)
{ {
ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, request.PlaySessionId, path => true); return ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, request.PlaySessionId, path => true);
} }
/// <summary> /// <summary>

Loading…
Cancel
Save