Duncan Tourolle a0e7663323
All checks were successful
🏗️ Build Plugin / build (push) Successful in 2m35s
🧪 Test Plugin / test (push) Successful in 1m14s
refactor to unify data fetching and define abstract API for re-use
2025-12-06 17:29:05 +01:00

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);
}