refactor to unify data fetching and define abstract API for re-use
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user