From df5671263fc8370ae17b7a5d53f06a86de5cbc93 Mon Sep 17 00:00:00 2001 From: Tim Eisele Date: Sat, 26 Apr 2025 14:01:12 +0200 Subject: Merge pull request #13847 from Shadowghost/rework-chapter-management Rework chapter management --- .../Persistence/IChapterRepository.cs | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 MediaBrowser.Controller/Persistence/IChapterRepository.cs (limited to 'MediaBrowser.Controller/Persistence/IChapterRepository.cs') diff --git a/MediaBrowser.Controller/Persistence/IChapterRepository.cs b/MediaBrowser.Controller/Persistence/IChapterRepository.cs new file mode 100644 index 000000000..0844ddb36 --- /dev/null +++ b/MediaBrowser.Controller/Persistence/IChapterRepository.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using MediaBrowser.Model.Entities; + +namespace MediaBrowser.Controller.Persistence; + +/// +/// Interface IChapterRepository. +/// +public interface IChapterRepository +{ + /// + /// Deletes the chapters. + /// + /// The item. + void DeleteChapters(Guid itemId); + + /// + /// Saves the chapters. + /// + /// The item. + /// The set of chapters. + void SaveChapters(Guid itemId, IReadOnlyList chapters); + + /// + /// Gets all chapters associated with the baseItem. + /// + /// The BaseItems id. + /// A readonly list of chapter instances. + IReadOnlyList GetChapters(Guid baseItemId); + + /// + /// Gets a single chapter of a BaseItem on a specific index. + /// + /// The BaseItems id. + /// The index of that chapter. + /// A chapter instance. + ChapterInfo? GetChapter(Guid baseItemId, int index); +} -- cgit v1.2.3