aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Persistence/IItemPersistenceService.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-03-07 20:12:42 +0100
committerShadowghost <Ghost_of_Stone@web.de>2026-03-07 20:12:42 +0100
commit077fa89717957f871b172ca4b2dc4a178efd3bc5 (patch)
tree1c2be0089b3c33cda1ed96bde4b76a715a845df7 /MediaBrowser.Controller/Persistence/IItemPersistenceService.cs
parent268f23f39ac18e783156b91b575ee6a105b6937c (diff)
Split BaseItemRepository and IItemRepository
Diffstat (limited to 'MediaBrowser.Controller/Persistence/IItemPersistenceService.cs')
-rw-r--r--MediaBrowser.Controller/Persistence/IItemPersistenceService.cs47
1 files changed, 47 insertions, 0 deletions
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;
+
+/// <summary>
+/// Provides item persistence operations (save, delete, update).
+/// </summary>
+public interface IItemPersistenceService
+{
+ /// <summary>
+ /// Deletes items by their IDs.
+ /// </summary>
+ /// <param name="ids">The IDs to delete.</param>
+ void DeleteItem(params IReadOnlyList<Guid> ids);
+
+ /// <summary>
+ /// Saves items to the database.
+ /// </summary>
+ /// <param name="items">The items to save.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ void SaveItems(IReadOnlyList<BaseItem> items, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Saves image info for an item.
+ /// </summary>
+ /// <param name="item">The item.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>A task representing the asynchronous operation.</returns>
+ Task SaveImagesAsync(BaseItem item, CancellationToken cancellationToken = default);
+
+ /// <summary>
+ /// Reattaches user data entries to the correct item.
+ /// </summary>
+ /// <param name="item">The item.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>A task representing the asynchronous operation.</returns>
+ Task ReattachUserDataAsync(BaseItem item, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Updates inherited values.
+ /// </summary>
+ void UpdateInheritedValues();
+}