using System; using System.Threading; using System.Threading.Tasks; using Jellyfin.Plugin.Jellypod.Models; namespace Jellyfin.Plugin.Jellypod.Services; /// /// Service for downloading podcast episodes. /// public interface IPodcastDownloadService { /// /// Queues an episode for download. /// /// The podcast. /// The episode to download. /// Task representing the queue operation. Task QueueDownloadAsync(Podcast podcast, Episode episode); /// /// Downloads an episode immediately. /// /// The podcast. /// The episode to download. /// Optional progress reporter. /// Cancellation token. /// The local file path of the downloaded episode. Task DownloadEpisodeAsync( Podcast podcast, Episode episode, IProgress? progress = null, CancellationToken cancellationToken = default); /// /// Deletes a downloaded episode file. /// /// The episode whose file to delete. /// Task representing the delete operation. Task DeleteEpisodeFileAsync(Episode episode); /// /// Downloads podcast artwork. /// /// The podcast. /// Cancellation token. /// Task representing the download operation. Task DownloadPodcastArtworkAsync(Podcast podcast, CancellationToken cancellationToken = default); }