diff options
Diffstat (limited to 'MediaBrowser.Controller/Persistence/IItemRepository.cs')
| -rw-r--r-- | MediaBrowser.Controller/Persistence/IItemRepository.cs | 61 |
1 files changed, 44 insertions, 17 deletions
diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs index 47e0f3453..a084f9196 100644 --- a/MediaBrowser.Controller/Persistence/IItemRepository.cs +++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs @@ -1,3 +1,7 @@ +#nullable disable + +#pragma warning disable CS1591 + using System; using System.Collections.Generic; using System.Threading; @@ -9,12 +13,12 @@ using MediaBrowser.Model.Querying; namespace MediaBrowser.Controller.Persistence { /// <summary> - /// Provides an interface to implement an Item repository + /// Provides an interface to implement an Item repository. /// </summary> public interface IItemRepository : IRepository { /// <summary> - /// Saves an item + /// Saves an item. /// </summary> /// <param name="item">The item.</param> /// <param name="cancellationToken">The cancellation token.</param> @@ -24,8 +28,7 @@ namespace MediaBrowser.Controller.Persistence /// Deletes the item. /// </summary> /// <param name="id">The identifier.</param> - /// <param name="cancellationToken">The cancellation token.</param> - void DeleteItem(Guid id, CancellationToken cancellationToken); + void DeleteItem(Guid id); /// <summary> /// Saves the items. @@ -44,24 +47,26 @@ namespace MediaBrowser.Controller.Persistence BaseItem RetrieveItem(Guid id); /// <summary> - /// Gets chapters for an item + /// Gets chapters for an item. /// </summary> - /// <param name="id"></param> - /// <returns></returns> - List<ChapterInfo> GetChapters(BaseItem id); + /// <param name="item">The item.</param> + /// <returns>The list of chapter info.</returns> + List<ChapterInfo> GetChapters(BaseItem item); /// <summary> - /// Gets a single chapter for an item + /// Gets a single chapter for an item. /// </summary> - /// <param name="id"></param> - /// <param name="index"></param> - /// <returns></returns> - ChapterInfo GetChapter(BaseItem id, int index); + /// <param name="item">The item.</param> + /// <param name="index">The chapter index.</param> + /// <returns>The chapter info at the specified index.</returns> + ChapterInfo GetChapter(BaseItem item, int index); /// <summary> /// Saves the chapters. /// </summary> - void SaveChapters(Guid id, List<ChapterInfo> chapters); + /// <param name="id">The item id.</param> + /// <param name="chapters">The list of chapters to save.</param> + void SaveChapters(Guid id, IReadOnlyList<ChapterInfo> chapters); /// <summary> /// Gets the media streams. @@ -79,11 +84,27 @@ namespace MediaBrowser.Controller.Persistence void SaveMediaStreams(Guid id, List<MediaStream> streams, CancellationToken cancellationToken); /// <summary> + /// Gets the media attachments. + /// </summary> + /// <param name="query">The query.</param> + /// <returns>IEnumerable{MediaAttachment}.</returns> + List<MediaAttachment> GetMediaAttachments(MediaAttachmentQuery query); + + /// <summary> + /// Saves the media attachments. + /// </summary> + /// <param name="id">The identifier.</param> + /// <param name="attachments">The attachments.</param> + /// <param name="cancellationToken">The cancellation token.</param> + void SaveMediaAttachments(Guid id, IReadOnlyList<MediaAttachment> attachments, CancellationToken cancellationToken); + + /// <summary> /// Gets the item ids. /// </summary> /// <param name="query">The query.</param> /// <returns>IEnumerable<Guid>.</returns> QueryResult<Guid> GetItemIds(InternalItemsQuery query); + /// <summary> /// Gets the items. /// </summary> @@ -136,22 +157,28 @@ namespace MediaBrowser.Controller.Persistence /// <summary> /// Updates the inherited values. /// </summary> - /// <param name="cancellationToken">The cancellation token.</param> - void UpdateInheritedValues(CancellationToken cancellationToken); + void UpdateInheritedValues(); int GetCount(InternalItemsQuery query); QueryResult<(BaseItem, ItemCounts)> GetGenres(InternalItemsQuery query); + QueryResult<(BaseItem, ItemCounts)> GetMusicGenres(InternalItemsQuery query); + QueryResult<(BaseItem, ItemCounts)> GetStudios(InternalItemsQuery query); + QueryResult<(BaseItem, ItemCounts)> GetArtists(InternalItemsQuery query); + QueryResult<(BaseItem, ItemCounts)> GetAlbumArtists(InternalItemsQuery query); + QueryResult<(BaseItem, ItemCounts)> GetAllArtists(InternalItemsQuery query); List<string> GetMusicGenreNames(); + List<string> GetStudioNames(); + List<string> GetGenreNames(); + List<string> GetAllArtistNames(); } } - |
