using Jellyfin.Plugin.RecentlyAddedGuard.Core;
using MediaBrowser.Model.Plugins;
namespace Jellyfin.Plugin.RecentlyAddedGuard.Configuration;
///
/// The plugin configuration.
///
public class PluginConfiguration : BasePluginConfiguration
{
///
/// Gets or sets the number of days within which a returning medium counts as an upgrade.
///
public int GraceDays { get; set; } = 14;
///
/// Gets or sets a value indicating whether movies are protected.
///
public bool EnableMovies { get; set; } = true;
///
/// Gets or sets a value indicating whether episodes are protected.
///
public bool EnableEpisodes { get; set; } = true;
///
/// Gets or sets a value indicating whether upgrades are only logged, not corrected.
///
public bool DryRun { get; set; }
///
/// Gets or sets the tolerance in seconds for comparing dates.
///
public int ToleranceSeconds { get; set; } = 60;
///
/// Maps the configuration to the options of the core logic.
///
/// The options.
public GuardOptions ToGuardOptions() => new(GraceDays, ToleranceSeconds, DryRun);
}