Duncan Tourolle d890c11a9b
All checks were successful
🏗️ Build Plugin / build (push) Successful in 2m1s
🧪 Test Plugin / test (push) Successful in 1m0s
🚀 Release Plugin / build-and-release (push) Successful in 2m1s
Add a retention timer for podcast
2025-12-30 16:20:26 +01:00

84 lines
2.4 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 maximum age in days for downloaded episodes.
/// 0 = use global setting, -1 = unlimited, greater than 0 = specific days.
/// </summary>
public int MaxEpisodeAgeDays { 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();
}