feat: Recently Added Guard plugin for Jellyfin 12.2
Keeps Radarr/Sonarr quality upgrades out of "Recently Added" by keeping a ledger of the first date added per logical medium (movie or episode, identified by provider ids and the series) and restoring it on upgrades. - core logic without Jellyfin types (Reconciler, MediaKeys, GuardProcessor) - thread-safe ledger with atomic, debounced persistence - event processing via channel and background worker, seed on first start - scheduled task "Ledger synchronisieren", status API, configuration page - xUnit tests and a Jellyfin 12.2 integration test - Gitea workflows: build/test, release with jprm and manifest branch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
d431486095
38 files changed
+4396
No files matched your search
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace Jellyfin.Plugin.RecentlyAddedGuard.Core;
|
||||
|
||||
/// <summary>
|
||||
/// The settings the core logic depends on, decoupled from the Jellyfin plugin configuration.
|
||||
/// </summary>
|
||||
/// <param name="GraceDays">Days within which a returning medium counts as an upgrade.</param>
|
||||
/// <param name="ToleranceSeconds">Date differences up to this many seconds are ignored.</param>
|
||||
/// <param name="DryRun">Only log detected upgrades, never change items.</param>
|
||||
public sealed record GuardOptions(int GraceDays, int ToleranceSeconds, bool DryRun)
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the defaults (14 days, 60 seconds, no dry run).
|
||||
/// </summary>
|
||||
public static GuardOptions Default { get; } = new(14, 60, false);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the grace period.
|
||||
/// </summary>
|
||||
public TimeSpan GracePeriod => TimeSpan.FromDays(Math.Max(0, GraceDays));
|
||||
|
||||
/// <summary>
|
||||
/// Gets the tolerance for date comparisons.
|
||||
/// </summary>
|
||||
public TimeSpan Tolerance => TimeSpan.FromSeconds(Math.Max(0, ToleranceSeconds));
|
||||
}
|
||||
Reference in new issue
Block a user