78 lines
2.2 KiB
C#
78 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.ObjectModel;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Jellyfin.Plugin.Jellypod.Models;
|
|
|
|
/// <summary>
|
|
/// Represents a podcast subscription.
|
|
/// </summary>
|
|
public class Podcast
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the unique identifier for this podcast.
|
|
/// </summary>
|
|
public Guid Id { get; set; } = Guid.NewGuid();
|
|
|
|
/// <summary>
|
|
/// Gets or sets the podcast title.
|
|
/// </summary>
|
|
public string Title { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the podcast description.
|
|
/// </summary>
|
|
public string Description { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the RSS feed URL.
|
|
/// </summary>
|
|
public string FeedUrl { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the podcast artwork URL.
|
|
/// </summary>
|
|
public string? ImageUrl { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the podcast author/publisher.
|
|
/// </summary>
|
|
public string? Author { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the podcast language.
|
|
/// </summary>
|
|
public string? Language { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the podcast category.
|
|
/// </summary>
|
|
public string? Category { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the last time the feed was updated.
|
|
/// </summary>
|
|
public DateTime LastUpdated { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the date this podcast was added.
|
|
/// </summary>
|
|
public DateTime DateAdded { get; set; } = DateTime.UtcNow;
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether auto-download is enabled for this podcast.
|
|
/// </summary>
|
|
public bool AutoDownloadEnabled { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the maximum episodes to keep (0 = unlimited).
|
|
/// </summary>
|
|
public int MaxEpisodesToKeep { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the list of episodes.
|
|
/// </summary>
|
|
[SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Required for JSON deserialization")]
|
|
public Collection<Episode> Episodes { get; set; } = new();
|
|
}
|