First POC with podcasts library
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user