25 lines
924 B
C#
25 lines
924 B
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Jellyfin.Plugin.SRFPlay.Services.Interfaces;
|
|
|
|
/// <summary>
|
|
/// Interface for managing content expiration.
|
|
/// </summary>
|
|
public interface IContentExpirationService
|
|
{
|
|
/// <summary>
|
|
/// Checks for expired content and removes it from the library.
|
|
/// </summary>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>The number of items removed.</returns>
|
|
Task<int> CheckAndRemoveExpiredContentAsync(CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Gets statistics about content expiration.
|
|
/// </summary>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Tuple with total count, expired count, and items expiring soon.</returns>
|
|
Task<(int Total, int Expired, int ExpiringSoon)> GetExpirationStatisticsAsync(CancellationToken cancellationToken);
|
|
}
|