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,29 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jellyfin.Plugin.RecentlyAddedGuard.Core;
|
||||
|
||||
/// <summary>
|
||||
/// An external source for the first "date added" of a medium, e.g. the import history of Radarr or Sonarr.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Extension point for v2: implementations registered in the DI container are consulted by the
|
||||
/// ledger synchronization, and earlier dates lower the ledger via <see cref="Reconciler.ApplyExternalFirstAdded"/>.
|
||||
/// v1 ships no implementation.
|
||||
/// </remarks>
|
||||
public interface IExternalDateSource
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name of the source for logs.
|
||||
/// </summary>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Looks up when the medium was first imported.
|
||||
/// </summary>
|
||||
/// <param name="identity">The medium.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>The first import date (UTC), or <c>null</c> if unknown.</returns>
|
||||
Task<DateTime?> GetFirstAddedAsync(MediaIdentity identity, CancellationToken cancellationToken);
|
||||
}
|
||||
Reference in new issue
Block a user