You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
172 lines
6.2 KiB
172 lines
6.2 KiB
using MediaBrowser.Controller.Entities;
|
|
using MediaBrowser.Model.Entities;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using MediaBrowser.Model.Dto;
|
|
using MediaBrowser.Model.Querying;
|
|
|
|
namespace MediaBrowser.Controller.Persistence
|
|
{
|
|
/// <summary>
|
|
/// Provides an interface to implement an Item repository
|
|
/// </summary>
|
|
public interface IItemRepository : IRepository
|
|
{
|
|
/// <summary>
|
|
/// Saves an item
|
|
/// </summary>
|
|
/// <param name="item">The item.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
void SaveItem(BaseItem item, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Deletes the item.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
void DeleteItem(Guid id, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Gets the critic reviews.
|
|
/// </summary>
|
|
/// <param name="itemId">The item id.</param>
|
|
/// <returns>Task{IEnumerable{ItemReview}}.</returns>
|
|
List<ItemReview> GetCriticReviews(Guid itemId);
|
|
|
|
/// <summary>
|
|
/// Saves the critic reviews.
|
|
/// </summary>
|
|
/// <param name="itemId">The item id.</param>
|
|
/// <param name="criticReviews">The critic reviews.</param>
|
|
void SaveCriticReviews(Guid itemId, IEnumerable<ItemReview> criticReviews);
|
|
|
|
/// <summary>
|
|
/// Saves the items.
|
|
/// </summary>
|
|
/// <param name="items">The items.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
void SaveItems(List<BaseItem> items, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Retrieves the item.
|
|
/// </summary>
|
|
/// <param name="id">The id.</param>
|
|
/// <returns>BaseItem.</returns>
|
|
BaseItem RetrieveItem(Guid id);
|
|
|
|
/// <summary>
|
|
/// Gets chapters for an item
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
List<ChapterInfo> GetChapters(Guid id);
|
|
|
|
/// <summary>
|
|
/// Gets a single chapter for an item
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <param name="index"></param>
|
|
/// <returns></returns>
|
|
ChapterInfo GetChapter(Guid id, int index);
|
|
|
|
/// <summary>
|
|
/// Saves the chapters.
|
|
/// </summary>
|
|
void SaveChapters(Guid id, List<ChapterInfo> chapters);
|
|
|
|
/// <summary>
|
|
/// Gets the media streams.
|
|
/// </summary>
|
|
/// <param name="query">The query.</param>
|
|
/// <returns>IEnumerable{MediaStream}.</returns>
|
|
List<MediaStream> GetMediaStreams(MediaStreamQuery query);
|
|
|
|
/// <summary>
|
|
/// Saves the media streams.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <param name="streams">The streams.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
void SaveMediaStreams(Guid id, List<MediaStream> streams, 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>
|
|
/// <param name="query">The query.</param>
|
|
/// <returns>QueryResult<BaseItem>.</returns>
|
|
QueryResult<BaseItem> GetItems(InternalItemsQuery query);
|
|
|
|
/// <summary>
|
|
/// Gets the item ids list.
|
|
/// </summary>
|
|
/// <param name="query">The query.</param>
|
|
/// <returns>List<Guid>.</returns>
|
|
List<Guid> GetItemIdsList(InternalItemsQuery query);
|
|
|
|
/// <summary>
|
|
/// Gets the people.
|
|
/// </summary>
|
|
/// <param name="query">The query.</param>
|
|
/// <returns>List<PersonInfo>.</returns>
|
|
List<PersonInfo> GetPeople(InternalPeopleQuery query);
|
|
|
|
/// <summary>
|
|
/// Updates the people.
|
|
/// </summary>
|
|
/// <param name="itemId">The item identifier.</param>
|
|
/// <param name="people">The people.</param>
|
|
void UpdatePeople(Guid itemId, List<PersonInfo> people);
|
|
|
|
/// <summary>
|
|
/// Gets the people names.
|
|
/// </summary>
|
|
/// <param name="query">The query.</param>
|
|
/// <returns>List<System.String>.</returns>
|
|
List<string> GetPeopleNames(InternalPeopleQuery query);
|
|
|
|
/// <summary>
|
|
/// Gets the item ids with path.
|
|
/// </summary>
|
|
/// <param name="query">The query.</param>
|
|
/// <returns>QueryResult<Tuple<Guid, System.String>>.</returns>
|
|
List<Tuple<Guid, string>> GetItemIdsWithPath(InternalItemsQuery query);
|
|
|
|
/// <summary>
|
|
/// Gets the item list.
|
|
/// </summary>
|
|
/// <param name="query">The query.</param>
|
|
/// <returns>List<BaseItem>.</returns>
|
|
List<BaseItem> GetItemList(InternalItemsQuery query);
|
|
|
|
/// <summary>
|
|
/// Updates the inherited values.
|
|
/// </summary>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
void UpdateInheritedValues(CancellationToken cancellationToken);
|
|
|
|
int GetCount(InternalItemsQuery query);
|
|
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetGenres(InternalItemsQuery query);
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetMusicGenres(InternalItemsQuery query);
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetGameGenres(InternalItemsQuery query);
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetStudios(InternalItemsQuery query);
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetArtists(InternalItemsQuery query);
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetAlbumArtists(InternalItemsQuery query);
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetAllArtists(InternalItemsQuery query);
|
|
|
|
List<string> GetGameGenreNames();
|
|
List<string> GetMusicGenreNames();
|
|
List<string> GetStudioNames();
|
|
List<string> GetGenreNames();
|
|
List<string> GetAllArtistNames();
|
|
}
|
|
}
|
|
|