using System; namespace Jellyfin.Plugin.RecentlyAddedGuard.Core; /// /// What the concluded for an item. /// public enum ReconcileAction { /// The item has no identity keys (yet) and was skipped. Ignored, /// A new medium; a ledger entry was created with the item's date. Registered, /// A known medium whose date matches the ledger. Unchanged, /// The item is older than the ledger (e.g. a date from an NFO); the ledger took the earlier date. FirstAddedLowered, /// The medium returned after the grace period; it counts as new and the ledger took its date. ReturnedAfterGrace, /// The item is newer than the ledger: an upgrade whose date has to be restored. UpgradeDetected } /// /// The outcome of reconciling one item with the ledger. /// /// The conclusion. /// The item. /// The item's "date added" as evaluated (UTC). /// The ledger's first "date added" after reconciling (UTC). public sealed record ReconcileResult(ReconcileAction Action, MediaIdentity Identity, DateTime ItemDate, DateTime FirstAdded);