diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index 7c67f0a733..435bca0b8c 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -314,17 +314,16 @@ namespace MediaBrowser.Api
///
/// The device id.
/// The delete files.
- /// if set to true [acquire lock].
/// Task.
/// deviceId
- internal Task KillTranscodingJobs(string deviceId, Func deleteFiles, bool acquireLock)
+ internal Task KillTranscodingJobs(string deviceId, Func deleteFiles)
{
if (string.IsNullOrEmpty(deviceId))
{
throw new ArgumentNullException("deviceId");
}
- return KillTranscodingJobs(j => string.Equals(deviceId, j.DeviceId, StringComparison.OrdinalIgnoreCase), deleteFiles, acquireLock);
+ return KillTranscodingJobs(j => string.Equals(deviceId, j.DeviceId, StringComparison.OrdinalIgnoreCase), deleteFiles);
}
///
@@ -332,9 +331,8 @@ namespace MediaBrowser.Api
///
/// The kill job.
/// The delete files.
- /// if set to true [acquire lock].
/// Task.
- internal async Task KillTranscodingJobs(Func killJob, Func deleteFiles, bool acquireLock)
+ internal async Task KillTranscodingJobs(Func killJob, Func deleteFiles)
{
var jobs = new List();
@@ -350,10 +348,7 @@ namespace MediaBrowser.Api
return;
}
- if (acquireLock)
- {
- await TranscodingStartLock.WaitAsync(CancellationToken.None).ConfigureAwait(false);
- }
+ await TranscodingStartLock.WaitAsync(CancellationToken.None).ConfigureAwait(false);
try
{
@@ -364,10 +359,7 @@ namespace MediaBrowser.Api
}
finally
{
- if (acquireLock)
- {
- TranscodingStartLock.Release();
- }
+ TranscodingStartLock.Release();
}
}
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index 2bb706769b..fb8168198d 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -139,7 +139,7 @@ namespace MediaBrowser.Api.Playback.Hls
// If the playlist doesn't already exist, startup ffmpeg
try
{
- await ApiEntryPoint.Instance.KillTranscodingJobs(j => j.Type == TranscodingJobType.Hls && string.Equals(j.DeviceId, request.DeviceId, StringComparison.OrdinalIgnoreCase), p => !string.Equals(p, playlistPath, StringComparison.OrdinalIgnoreCase), false).ConfigureAwait(false);
+ await ApiEntryPoint.Instance.KillTranscodingJobs(j => j.Type == TranscodingJobType.Hls && string.Equals(j.DeviceId, request.DeviceId, StringComparison.OrdinalIgnoreCase), p => !string.Equals(p, playlistPath, StringComparison.OrdinalIgnoreCase)).ConfigureAwait(false);
if (currentTranscodingIndex.HasValue)
{
diff --git a/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs b/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs
index 7e32246a29..a8d4c6b86f 100644
--- a/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs
+++ b/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs
@@ -72,7 +72,7 @@ namespace MediaBrowser.Api.Playback.Hls
public void Delete(StopEncodingProcess request)
{
- var task = ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, path => true, true);
+ var task = ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, path => true);
Task.WaitAll(task);
}
diff --git a/MediaBrowser.Api/UserLibrary/UserLibraryService.cs b/MediaBrowser.Api/UserLibrary/UserLibraryService.cs
index b156b68d1a..ff86c8473b 100644
--- a/MediaBrowser.Api/UserLibrary/UserLibraryService.cs
+++ b/MediaBrowser.Api/UserLibrary/UserLibraryService.cs
@@ -566,13 +566,13 @@ namespace MediaBrowser.Api.UserLibrary
///
/// The request.
/// System.Object.
- public object Get(GetIntros request)
+ public async Task