The Free Software Media System - Server Backend & API
reduce use of ILiveTvRecording
Luke Pulverentib97491cdad6d
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.csindex a8f847f53a..bd25b23f77 100644--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs@@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <param name="recording">The recording.</param>/// <returns>Task.</returns>- Task DeleteRecording(ILiveTvRecording recording);+ Task DeleteRecording(BaseItem recording);/// <summary>/// Cancels the timer.@@ -156,7 +156,7 @@ namespace MediaBrowser.Controller.LiveTv/// <param name="id">The identifier.</param>/// <param name="cancellationToken">The cancellation token.</param>/// <returns>LiveTvRecording.</returns>- Task<ILiveTvRecording> GetInternalRecording(string id, CancellationToken cancellationToken);+ Task<BaseItem> GetInternalRecording(string id, CancellationToken cancellationToken);/// <summary>/// Gets the recording stream.@@ -396,7 +396,7 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <param name="recording">The recording.</param>/// <returns>Task.</returns>- Task OnRecordingFileDeleted(ILiveTvRecording recording);+ Task OnRecordingFileDeleted(BaseItem recording);/// <summary>/// Gets the sat ini mappings.diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.csindex 5949a65371..47379fcb05 100644--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs@@ -300,7 +300,7 @@ namespace MediaBrowser.Server.Implementations.LiveTvreturn _libraryManager.GetItemById(id) as LiveTvProgram;}- public async Task<ILiveTvRecording> GetInternalRecording(string id, CancellationToken cancellationToken)+ public async Task<BaseItem> GetInternalRecording(string id, CancellationToken cancellationToken){if (string.IsNullOrWhiteSpace(id)){@@ -313,7 +313,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv}, cancellationToken).ConfigureAwait(false);- return result.Items.FirstOrDefault() as ILiveTvRecording;+ return result.Items.FirstOrDefault();}private readonly SemaphoreSlim _liveStreamSemaphore = new SemaphoreSlim(1, 1);@@ -1698,7 +1698,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv};}- public Task OnRecordingFileDeleted(ILiveTvRecording recording)+ public Task OnRecordingFileDeleted(BaseItem recording){var service = GetService(recording);@@ -1720,10 +1720,10 @@ namespace MediaBrowser.Server.Implementations.LiveTvthrow new ResourceNotFoundException(string.Format("Recording with Id {0} not found", recordingId));}- await DeleteRecording(recording).ConfigureAwait(false);+ await DeleteRecording((BaseItem)recording).ConfigureAwait(false);}- public async Task DeleteRecording(ILiveTvRecording recording)+ public async Task DeleteRecording(BaseItem recording){var service = GetService(recording.ServiceName);