Files
Jonas MenzelandClaude Opus 5.5 d431486095
build / build (push) Successful in 1m10s
release / release (push) Failing after 1m36s
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>
2026-10-21 23:10:02 +02:00

32 lines
1011 B
C#

using System;
using System.Collections.Generic;
namespace Jellyfin.Plugin.RecentlyAddedGuard.Core;
/// <summary>
/// Kind of logical medium tracked by the ledger.
/// </summary>
public enum MediaKind
{
/// <summary>A movie.</summary>
Movie,
/// <summary>A TV episode (or a multi-episode file).</summary>
Episode
}
/// <summary>
/// Jellyfin-independent snapshot of a library item, as consumed by the <see cref="Reconciler"/>.
/// </summary>
/// <param name="ItemId">The Jellyfin item id.</param>
/// <param name="Kind">The kind of medium.</param>
/// <param name="DateCreated">The item's current "date added" (UTC).</param>
/// <param name="Keys">All identity keys of the logical medium; empty if the item cannot be identified yet.</param>
/// <param name="DisplayName">Human readable name for logs and the configuration page.</param>
public sealed record MediaIdentity(
Guid ItemId,
MediaKind Kind,
DateTime DateCreated,
IReadOnlyList<string> Keys,
string DisplayName);