mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-06 06:12:52 +01:00
Surface extras across all versions
This commit is contained in:
@@ -2854,6 +2854,15 @@ namespace MediaBrowser.Controller.Entities
|
||||
return LibraryManager.Sort(GetExtras(user).Where(e => e.ExtraType == Model.Entities.ExtraType.ThemeVideo), user, orderBy).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the ids of the items whose owned extras belong to this item.
|
||||
/// </summary>
|
||||
/// <returns>An array containing the owner ids.</returns>
|
||||
protected virtual Guid[] GetExtraOwnerIds()
|
||||
{
|
||||
return [Id];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all extras associated with this item, sorted by <see cref="SortName"/>.
|
||||
/// </summary>
|
||||
@@ -2863,7 +2872,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return LibraryManager.GetItemList(new InternalItemsQuery(user)
|
||||
{
|
||||
OwnerIds = [Id],
|
||||
OwnerIds = GetExtraOwnerIds(),
|
||||
OrderBy = [(ItemSortBy.SortName, SortOrder.Ascending)]
|
||||
});
|
||||
}
|
||||
@@ -2878,7 +2887,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return LibraryManager.GetItemList(new InternalItemsQuery(user)
|
||||
{
|
||||
OwnerIds = [Id],
|
||||
OwnerIds = GetExtraOwnerIds(),
|
||||
ExtraTypes = extraTypes.ToArray(),
|
||||
OrderBy = [(ItemSortBy.SortName, SortOrder.Ascending)]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user