using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Entities; namespace MediaBrowser.Controller.Persistence; /// /// Provides item persistence operations (save, delete, update). /// public interface IItemPersistenceService { /// /// Deletes items by their IDs. /// /// The IDs to delete. void DeleteItem(params IReadOnlyList ids); /// /// Saves items to the database. /// /// The items to save. /// The cancellation token. void SaveItems(IReadOnlyList items, CancellationToken cancellationToken); /// /// Saves image info for an item. /// /// The item. /// The cancellation token. /// A task representing the asynchronous operation. Task SaveImagesAsync(BaseItem item, CancellationToken cancellationToken = default); /// /// Reattaches user data entries to the correct item. /// /// The item. /// The cancellation token. /// A task representing the asynchronous operation. Task ReattachUserDataAsync(BaseItem item, CancellationToken cancellationToken); /// /// Updates inherited values. /// void UpdateInheritedValues(); }