using System.Threading; using System.Threading.Tasks; using Jellyfin.Plugin.SRFPlay.Api.Models; using Jellyfin.Plugin.SRFPlay.Configuration; namespace Jellyfin.Plugin.SRFPlay.Services.Interfaces; /// /// Interface for resolving stream URLs from media composition resources. /// public interface IStreamUrlResolver { /// /// Gets the best stream URL from a chapter based on quality preference. /// /// The chapter containing resources. /// The quality preference. /// The stream URL, or null if no suitable stream found. string? GetStreamUrl(Chapter chapter, QualityPreference qualityPreference); /// /// Checks if a chapter has non-DRM playable content. /// /// The chapter to check. /// True if playable content is available. bool HasPlayableContent(Chapter chapter); /// /// Checks if content is expired based on ValidTo date. /// /// The chapter to check. /// True if the content is expired. bool IsContentExpired(Chapter chapter); /// /// Authenticates a stream URL by fetching an Akamai token. /// /// The unauthenticated stream URL. /// Cancellation token. /// The authenticated stream URL with token. Task GetAuthenticatedStreamUrlAsync(string streamUrl, CancellationToken cancellationToken = default); }