diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-07-12 13:21:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-12 13:21:27 -0400 |
| commit | b188b7ef06875d7031bb68f0a2fb92d486f95549 (patch) | |
| tree | 56a479573216a4993fb3fe373273677a82b9d8f5 /MediaBrowser.Api/ApiEntryPoint.cs | |
| parent | 18a0332f218d13893bd7754aaf931367756e0e05 (diff) | |
| parent | c90a30a0fedd4b5424981795f4091d3c5d97ca67 (diff) | |
Merge pull request #1938 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Api/ApiEntryPoint.cs')
| -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)) |
