First POC with podcasts library
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Jellyfin.Plugin.Jellypod.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Request to add a new podcast.
|
||||
/// </summary>
|
||||
public class AddPodcastRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the RSS feed URL.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string FeedUrl { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether to enable auto-download.
|
||||
/// </summary>
|
||||
public bool? AutoDownload { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Jellyfin.Plugin.Jellypod.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Request to download episodes from a podcast.
|
||||
/// </summary>
|
||||
public class DownloadEpisodesRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the number of episodes to download.
|
||||
/// </summary>
|
||||
public int Count { get; set; } = 5;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Jellyfin.Plugin.Jellypod.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Result of a download request.
|
||||
/// </summary>
|
||||
public class DownloadResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the number of episodes queued for download.
|
||||
/// </summary>
|
||||
public int QueuedCount { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Jellyfin.Plugin.Jellypod.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Request to preview a feed.
|
||||
/// </summary>
|
||||
public class PreviewFeedRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the RSS feed URL.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string FeedUrl { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace Jellyfin.Plugin.Jellypod.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update a podcast.
|
||||
/// </summary>
|
||||
public class UpdatePodcastRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets whether to enable auto-download.
|
||||
/// </summary>
|
||||
public bool? AutoDownload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum episodes to keep.
|
||||
/// </summary>
|
||||
public int? MaxEpisodesToKeep { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user