mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
reduce use of ILiveTvRecording
This commit is contained in:
parent
b9082d7e64
commit
b97491cdad
@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="recording">The recording.</param>
|
/// <param name="recording">The recording.</param>
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
Task DeleteRecording(ILiveTvRecording recording);
|
Task DeleteRecording(BaseItem recording);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cancels the timer.
|
/// Cancels the timer.
|
||||||
@ -156,7 +156,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
/// <param name="id">The identifier.</param>
|
/// <param name="id">The identifier.</param>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <returns>LiveTvRecording.</returns>
|
/// <returns>LiveTvRecording.</returns>
|
||||||
Task<ILiveTvRecording> GetInternalRecording(string id, CancellationToken cancellationToken);
|
Task<BaseItem> GetInternalRecording(string id, CancellationToken cancellationToken);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the recording stream.
|
/// Gets the recording stream.
|
||||||
@ -396,7 +396,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="recording">The recording.</param>
|
/// <param name="recording">The recording.</param>
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
Task OnRecordingFileDeleted(ILiveTvRecording recording);
|
Task OnRecordingFileDeleted(BaseItem recording);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the sat ini mappings.
|
/// Gets the sat ini mappings.
|
||||||
|
@ -300,7 +300,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||||||
return _libraryManager.GetItemById(id) as LiveTvProgram;
|
return _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))
|
if (string.IsNullOrWhiteSpace(id))
|
||||||
{
|
{
|
||||||
@ -313,7 +313,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||||||
|
|
||||||
}, cancellationToken).ConfigureAwait(false);
|
}, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
return result.Items.FirstOrDefault() as ILiveTvRecording;
|
return result.Items.FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly SemaphoreSlim _liveStreamSemaphore = new SemaphoreSlim(1, 1);
|
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);
|
var service = GetService(recording);
|
||||||
|
|
||||||
@ -1720,10 +1720,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||||||
throw new ResourceNotFoundException(string.Format("Recording with Id {0} not found", recordingId));
|
throw 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);
|
var service = GetService(recording.ServiceName);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user