diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-07-12 01:44:07 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-07-12 01:44:07 -0400 |
| commit | c29e2099cdde462d433068732070b5ab79b27728 (patch) | |
| tree | 45f687bcbd7720832cf2b192acc9f229c53ee8bc | |
| parent | 58d904a51a96bc15288b2ff0f99c87cdcb44728a (diff) | |
fix error when transcode fails to start
| -rw-r--r-- | MediaBrowser.Api/ApiEntryPoint.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs index a677bc600..dc811812a 100644 --- a/MediaBrowser.Api/ApiEntryPoint.cs +++ b/MediaBrowser.Api/ApiEntryPoint.cs @@ -237,9 +237,12 @@ namespace MediaBrowser.Api { 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)) |
