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>
21 lines
692 B
C#
21 lines
692 B
C#
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Jellyfin.Plugin.RecentlyAddedGuard.Core;
|
|
|
|
/// <summary>
|
|
/// Writes the "date added" of a library item.
|
|
/// </summary>
|
|
public interface IItemDateWriter
|
|
{
|
|
/// <summary>
|
|
/// Sets the item's "date added" and saves it.
|
|
/// </summary>
|
|
/// <param name="itemId">The item.</param>
|
|
/// <param name="dateCreated">The new "date added" (UTC).</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns><c>false</c> if the item no longer exists.</returns>
|
|
Task<bool> TrySetDateCreatedAsync(Guid itemId, DateTime dateCreated, CancellationToken cancellationToken);
|
|
}
|