using System; using System.Threading; using System.Threading.Tasks; using Jellyfin.Plugin.JRay.Models; namespace Jellyfin.Plugin.JRay.Services.Interfaces; /// /// Stores and retrieves truth files that were pushed to JRay directly /// (e.g. by a remote extraction worker), independent of any sidecar file /// on the media filesystem. /// public interface IManagedTruthStore { /// /// Loads the managed truth file for the given item, if one was uploaded. /// /// The Jellyfin library item id. /// Cancellation token. /// The parsed truth file, or null if none has been uploaded for this item. Task LoadAsync(Guid itemId, CancellationToken cancellationToken); /// /// Saves (creates or replaces) the managed truth file for the given item. /// /// The Jellyfin library item id. /// The truth file contents to persist. /// Cancellation token. /// A task that completes when the file has been written. Task SaveAsync(Guid itemId, TruthFile truth, CancellationToken cancellationToken); /// /// Deletes the managed truth file for the given item, if one exists. /// /// The Jellyfin library item id. /// true if a file was deleted; false if none existed. bool Delete(Guid itemId); }