Interface IItemRepository
Provides an interface to implement an Item repository
Inherited Members
System.IDisposable.Dispose()
Assembly: MediaBrowser.Controller.dll
public interface IItemRepository : IRepository, IDisposable
Properties
Declaration
long LiveTvViewId { get; set; }
Property Value
Type |
Description |
System.Int64 |
|
Methods
Declaration
void AddDatabase(ILibraryDatabase db)
Parameters
Declaration
ListItem[] AddListItems(BaseItem list, ListItem[] items, bool skipDuplicates)
Parameters
Type |
Name |
Description |
BaseItem |
list |
|
ListItem[] |
items |
|
System.Boolean |
skipDuplicates |
|
Returns
Declaration
void DeleteChannels(long[] idsToDelete)
Parameters
Type |
Name |
Description |
System.Int64[] |
idsToDelete |
|
Declaration
void DeleteChapters(long itemId, MarkerType[] markerTypes)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
MarkerType[] |
markerTypes |
|
Declaration
void DeleteItems(BaseItem[] item)
Parameters
Declaration
void DeleteItems(long[] ids)
Parameters
Type |
Name |
Description |
System.Int64[] |
ids |
|
Declaration
void DeleteUserItemShares(long itemId, UserItemShareLevel? maxShareLevel)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
System.Nullable<UserItemShareLevel> |
maxShareLevel |
|
Declaration
QueryResult<Tuple<BaseItem, ItemCounts>> GetAllGenres(InternalItemsQuery query)
Parameters
Returns
Declaration
QueryResult<Tuple<BaseItem, ItemCounts>> GetArtists(InternalItemsQuery query, ItemLinkType[] artistTypes)
Parameters
Returns
Declaration
QueryResult<string> GetAudioCodecs(InternalItemsQuery query)
Parameters
Returns
Declaration
QueryResult<string> GetAudioLayouts(InternalItemsQuery query)
Parameters
Returns
Gets a single chapter for an item
Declaration
ChapterInfo GetChapter(long itemId, int index)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
The item identifier.
|
System.Int32 |
index |
The index.
|
Returns
Gets chapters for an item
Declaration
List<ChapterInfo> GetChapters(BaseItem item)
Parameters
Type |
Name |
Description |
BaseItem |
item |
The item.
|
Returns
Type |
Description |
System.Collections.Generic.List<ChapterInfo> |
|
Declaration
List<ChapterInfo> GetChapters(long itemId, MarkerType[] markerTypes)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
MarkerType[] |
markerTypes |
|
Returns
Type |
Description |
System.Collections.Generic.List<ChapterInfo> |
|
GetCollectionFolderIdFromItemLinkId(Int64, Int64, IDataContext)
Declaration
List<long> GetCollectionFolderIdFromItemLinkId(long id, long rootRolderId, IDataContext dataContext)
Parameters
Type |
Name |
Description |
System.Int64 |
id |
|
System.Int64 |
rootRolderId |
|
IDataContext |
dataContext |
|
Returns
Type |
Description |
System.Collections.Generic.List<System.Int64> |
|
Declaration
int GetCount(InternalItemsQuery query)
Parameters
Returns
Type |
Description |
System.Int32 |
|
GetExtendedVideoTypes(InternalItemsQuery)
Declaration
QueryResult<ExtendedVideoTypes> GetExtendedVideoTypes(InternalItemsQuery query)
Parameters
Returns
GetExternalSubtitleFiles(Int64)
Declaration
List<string> GetExternalSubtitleFiles(long itemId)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
Declaration
long GetExtradataTypeId(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Int64 |
|
Declaration
ExtraType[] GetExtraTypes(InternalItemsQuery query)
Parameters
Returns
Declaration
QueryResult<Tuple<BaseItem, ItemCounts>> GetGameGenres(InternalItemsQuery query)
Parameters
Returns
Declaration
QueryResult<Tuple<BaseItem, ItemCounts>> GetGenres(InternalItemsQuery query)
Parameters
Returns
Declaration
Tuple<Guid, string> GetGuidAndPath(long itemId)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
Returns
Type |
Description |
System.Tuple<System.Guid, System.String> |
|
Declaration
(long, Guid)[] GetIdGuidPairs(InternalItemsQuery query)
Parameters
Returns
Type |
Description |
System.ValueTuple<System.Int64, System.Guid>[] |
|
Declaration
ItemImageInfo GetImageInfo(long itemId, ImageType imageType, int index)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
ImageType |
imageType |
|
System.Int32 |
index |
|
Returns
Declaration
LinkedItemInfo[] GetImportedCollections(long itemId)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
Returns
Declaration
long GetInternalId(Guid guid)
Parameters
Type |
Name |
Description |
System.Guid |
guid |
|
Returns
Type |
Description |
System.Int64 |
|
GetInternalItemIdsList(InternalItemsQuery, IDataContext)
Declaration
long[] GetInternalItemIdsList(InternalItemsQuery query, IDataContext dataContext)
Parameters
Returns
Type |
Description |
System.Int64[] |
|
Declaration
string GetIntroDetectionFailureResult(long itemId)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
Returns
Type |
Description |
System.String |
|
Declaration
List<IntroDebugInfo> GetIntrosDebugInfo()
Returns
Declaration
BaseItem GetItemByGuid(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
Declaration
BaseItem GetItemById(long id)
Parameters
Type |
Name |
Description |
System.Int64 |
id |
|
Returns
GetItemByIdInTransaction(Int64, IDataContext)
Declaration
BaseItem GetItemByIdInTransaction(long id, IDataContext dataContext)
Parameters
Type |
Name |
Description |
System.Int64 |
id |
|
IDataContext |
dataContext |
|
Returns
Declaration
string GetItemExtradataValue(long itemId, long extradataTypeId)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
System.Int64 |
extradataTypeId |
|
Returns
Type |
Description |
System.String |
|
Declaration
Guid[] GetItemIdsList(InternalItemsQuery query)
Parameters
Returns
Type |
Description |
System.Guid[] |
List<Guid>.
|
GetItemLinks(Int64, List<ItemLinkType>, IDataContext)
Declaration
List<(ItemLinkType, string, long)> GetItemLinks(long itemId, List<ItemLinkType> types, IDataContext dataContext)
Parameters
Returns
Type |
Description |
System.Collections.Generic.List<System.ValueTuple<ItemLinkType, System.String, System.Int64>> |
|
Declaration
BaseItem[] GetItemList(InternalItemsQuery query)
Parameters
Returns
Type |
Description |
BaseItem[] |
List<BaseItem>.
|
GetItemList(InternalItemsQuery, IDataContext)
Declaration
BaseItem[] GetItemList(InternalItemsQuery query, IDataContext dataContext)
Parameters
Returns
Declaration
List<PersonInfo> GetItemPeople(InternalPeopleQuery query)
Parameters
Returns
Type |
Description |
System.Collections.Generic.List<PersonInfo> |
List<PersonInfo>.
|
GetItems(InternalItemsQuery, IDataContext)
Declaration
QueryResult<BaseItem> GetItems(InternalItemsQuery query, IDataContext dataContext)
Parameters
Returns
Declaration
string[] GetItemTypes(InternalItemsQuery query)
Parameters
Returns
Type |
Description |
System.String[] |
|
Declaration
List<MediaStream> GetMediaStreams(MediaStreamQuery query)
Parameters
Returns
Type |
Description |
System.Collections.Generic.List<MediaStream> |
|
Declaration
QueryResult<Tuple<BaseItem, ItemCounts>> GetMusicAlbums(InternalItemsQuery query)
Parameters
Returns
Declaration
QueryResult<Tuple<BaseItem, ItemCounts>> GetMusicGenres(InternalItemsQuery query)
Parameters
Returns
Declaration
string GetNamedValue(long nameId)
Parameters
Type |
Name |
Description |
System.Int64 |
nameId |
|
Returns
Type |
Description |
System.String |
|
Declaration
string GetNamedValue(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.String |
|
Declaration
(string, long)[] GetNameIdPairs(InternalItemsQuery query)
Parameters
Returns
Type |
Description |
System.ValueTuple<System.String, System.Int64>[] |
|
Declaration
ListItem[] GetNewListItems(BaseItem list, ListItem[] items, bool skipDuplicates)
Parameters
Type |
Name |
Description |
BaseItem |
list |
|
ListItem[] |
items |
|
System.Boolean |
skipDuplicates |
|
Returns
Declaration
string[] GetPaths(InternalItemsQuery query)
Parameters
Returns
Type |
Description |
System.String[] |
|
Declaration
QueryResult<BaseItem> GetPeople(InternalItemsQuery query)
Parameters
Returns
Declaration
ProviderIdDictionary GetProviderIds(long itemId)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
Returns
Declaration
QueryResult<UserItemShareLevel?> GetShareLevels(InternalItemsQuery query)
Parameters
Returns
Declaration
QueryResult<string> GetStreamLanguages(InternalItemsQuery query, MediaStreamType streamType)
Parameters
Returns
Declaration
QueryResult<Tuple<BaseItem, ItemCounts>> GetStudios(InternalItemsQuery query)
Parameters
Returns
Declaration
QueryResult<string> GetSubtitleCodecs(InternalItemsQuery query)
Parameters
Returns
Declaration
List<string> GetSubviews(InternalItemsQuery query, string contentType)
Parameters
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
Declaration
long GetSyncTargetId(string name, bool createIfNotFound)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Boolean |
createIfNotFound |
|
Returns
Type |
Description |
System.Int64 |
|
Declaration
QueryResult<Tuple<BaseItem, ItemCounts>> GetTags(InternalItemsQuery query)
Parameters
Returns
Declaration
string GetThumbnailImageExtractionFailureResult(long itemId)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
Returns
Type |
Description |
System.String |
|
Declaration
Tuple<Type, ItemImageInfo> GetTypeAndImageInfo(long itemId, ImageType imageType, int index)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
ImageType |
imageType |
|
System.Int32 |
index |
|
Returns
Declaration
UserItemShare[] GetUserItemShares(UserItemShareQuery query)
Parameters
Returns
Declaration
QueryResult<string> GetVideoCodecs(InternalItemsQuery query)
Parameters
Returns
Declaration
void LogIntroDetectionFailureFailure(long itemId, long dateModifiedUnixTimeSeconds)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
System.Int64 |
dateModifiedUnixTimeSeconds |
|
Declaration
void LogThumbnailImageExtractionFailure(long itemId, long dateModifiedTicks)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
System.Int64 |
dateModifiedTicks |
|
Declaration
void MoveListItem(long listId, long entryId, int newIndex)
Parameters
Type |
Name |
Description |
System.Int64 |
listId |
|
System.Int64 |
entryId |
|
System.Int32 |
newIndex |
|
OnItemLinksFilled(BaseItem, IDataContext)
Declaration
void OnItemLinksFilled(BaseItem item, IDataContext dataContext)
Parameters
Declaration
void OnUserDeleted(long userId)
Parameters
Type |
Name |
Description |
System.Int64 |
userId |
|
Declaration
void RemoveListItemsByItemIds(long listId, long[] listItemIds)
Parameters
Type |
Name |
Description |
System.Int64 |
listId |
|
System.Int64[] |
listItemIds |
|
RemoveListItemsByListItemEntryIds(Int64, Int64[])
Declaration
void RemoveListItemsByListItemEntryIds(long listId, long[] listItemIds)
Parameters
Type |
Name |
Description |
System.Int64 |
listId |
|
System.Int64[] |
listItemIds |
|
Declaration
void SaveChapters(long itemId, bool clearExtractionFailureResult, List<ChapterInfo> chapters)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
System.Boolean |
clearExtractionFailureResult |
|
System.Collections.Generic.List<ChapterInfo> |
chapters |
|
Declaration
void SaveChapters(long itemId, List<ChapterInfo> chapters)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
System.Collections.Generic.List<ChapterInfo> |
chapters |
|
Declaration
void SaveImages(long id, ItemImageInfo[] images)
Parameters
Declaration
void SaveItem(BaseItem item, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
BaseItem |
item |
|
System.Threading.CancellationToken |
cancellationToken |
|
Declaration
void SaveItems(List<BaseItem> items, MetadataRefreshOptions metadataRefreshOptions, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<BaseItem> |
items |
|
MetadataRefreshOptions |
metadataRefreshOptions |
|
System.Threading.CancellationToken |
cancellationToken |
|
Declaration
void SaveItems(List<BaseItem> items, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<BaseItem> |
items |
The items.
|
System.Threading.CancellationToken |
cancellationToken |
The cancellation token.
|
Declaration
void SaveMediaStreams(long itemId, List<MediaStream> streams, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
The item identifier.
|
System.Collections.Generic.List<MediaStream> |
streams |
The streams.
|
System.Threading.CancellationToken |
cancellationToken |
The cancellation token.
|
Declaration
void SaveUserItemShares(UserItemShare[] shares)
Parameters
Declaration
void SetItemExtradata(long itemId, long extradataTypeId, string value)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
System.Int64 |
extradataTypeId |
|
System.String |
value |
|
Declaration
void SetNamedValue(long nameId, string value)
Parameters
Type |
Name |
Description |
System.Int64 |
nameId |
|
System.String |
value |
|
Declaration
void SetNamedValue(string name, string value)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
value |
|
Declaration
void SetSortIndexNumbers(List<Tuple<long, int>> values)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.Tuple<System.Int64, System.Int32>> |
values |
|
Declaration
void UpdateListItems(BaseItem list, LinkedChild[] items)
Parameters
Declaration
void UpdatePeople(long itemId, List<PersonInfo> people)
Parameters
Type |
Name |
Description |
System.Int64 |
itemId |
|
System.Collections.Generic.List<PersonInfo> |
people |
|
Declaration
void UpdateProgramsForChannel(BaseItem channel, List<BaseItem> programs, long[] programsToDelete)
Parameters
Type |
Name |
Description |
BaseItem |
channel |
|
System.Collections.Generic.List<BaseItem> |
programs |
|
System.Int64[] |
programsToDelete |
|
Events
Declaration
event EventHandler<GenericEventArgs<ItemTaggedEvent>> OnItemTagged
Event Type
Extension Methods