fix error when transcode fails to start

This commit is contained in:
Luke Pulverenti 2016-07-12 01:44:07 -04:00
parent 7ea5608683
commit 7117f78651

View File

@ -237,9 +237,12 @@ namespace MediaBrowser.Api
{ {
lock (_activeTranscodingJobs) lock (_activeTranscodingJobs)
{ {
var job = _activeTranscodingJobs.First(j => j.Type == type && string.Equals(j.Path, path, StringComparison.OrdinalIgnoreCase)); var job = _activeTranscodingJobs.FirstOrDefault(j => j.Type == type && string.Equals(j.Path, path, StringComparison.OrdinalIgnoreCase));
_activeTranscodingJobs.Remove(job); if (job != null)
{
_activeTranscodingJobs.Remove(job);
}
} }
if (!string.IsNullOrWhiteSpace(state.Request.DeviceId)) if (!string.IsNullOrWhiteSpace(state.Request.DeviceId))