From 077fa89717957f871b172ca4b2dc4a178efd3bc5 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Sat, 7 Mar 2026 20:12:42 +0100 Subject: Split BaseItemRepository and IItemRepository --- .../Persistence/IItemPersistenceService.cs | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 MediaBrowser.Controller/Persistence/IItemPersistenceService.cs (limited to 'MediaBrowser.Controller/Persistence/IItemPersistenceService.cs') diff --git a/MediaBrowser.Controller/Persistence/IItemPersistenceService.cs b/MediaBrowser.Controller/Persistence/IItemPersistenceService.cs new file mode 100644 index 0000000000..37f7194e7a --- /dev/null +++ b/MediaBrowser.Controller/Persistence/IItemPersistenceService.cs @@ -0,0 +1,47 @@ +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(); +} -- cgit v1.2.3