jellypod/Jellyfin.Plugin.Jellypod/Services/IPodcastStorageService.cs
Duncan Tourolle 4679b77d1a
Some checks failed
🏗️ Build Plugin / call (push) Failing after 0s
📝 Create/Update Release Draft & Release Bump PR / call (push) Failing after 0s
🔬 Run CodeQL / call (push) Failing after 0s
🧪 Test Plugin / call (push) Failing after 0s
First POC with podcasts library
2025-12-13 23:57:58 +01:00

61 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Jellyfin.Plugin.Jellypod.Models;
namespace Jellyfin.Plugin.Jellypod.Services;
/// <summary>
/// Service for storing and retrieving podcast data.
/// </summary>
public interface IPodcastStorageService
{
/// <summary>
/// Gets all subscribed podcasts.
/// </summary>
/// <returns>List of all podcasts.</returns>
Task<IReadOnlyList<Podcast>> GetAllPodcastsAsync();
/// <summary>
/// Gets a podcast by its ID.
/// </summary>
/// <param name="id">The podcast ID.</param>
/// <returns>The podcast, or null if not found.</returns>
Task<Podcast?> GetPodcastAsync(Guid id);
/// <summary>
/// Adds a new podcast subscription.
/// </summary>
/// <param name="podcast">The podcast to add.</param>
/// <returns>Task representing the operation.</returns>
Task AddPodcastAsync(Podcast podcast);
/// <summary>
/// Updates an existing podcast.
/// </summary>
/// <param name="podcast">The podcast to update.</param>
/// <returns>Task representing the operation.</returns>
Task UpdatePodcastAsync(Podcast podcast);
/// <summary>
/// Deletes a podcast subscription.
/// </summary>
/// <param name="id">The podcast ID to delete.</param>
/// <returns>Task representing the operation.</returns>
Task DeletePodcastAsync(Guid id);
/// <summary>
/// Gets the local file path for an episode.
/// </summary>
/// <param name="podcast">The parent podcast.</param>
/// <param name="episode">The episode.</param>
/// <returns>The file path where the episode should be stored.</returns>
string GetEpisodeFilePath(Podcast podcast, Episode episode);
/// <summary>
/// Gets the storage path for podcasts.
/// </summary>
/// <returns>The base path for podcast storage.</returns>
string GetStoragePath();
}