Surface extras for all versions

This commit is contained in:
Shadowghost
2026-06-04 02:58:20 +02:00
parent 17a275f283
commit 2e7d52f3a1
2 changed files with 24 additions and 2 deletions

View File

@@ -738,6 +738,19 @@ namespace MediaBrowser.Controller.Entities
}).FirstOrDefault();
}
/// <summary>
/// Gets the ids of the items whose owned extras belong to this item.
/// Extras are linked to a single version but need tp be surfaced for all versions.
/// </summary>
/// <returns>An array containing the owner ids.</returns>
protected override Guid[] GetExtraOwnerIds()
{
return GetAllItemsForMediaSources()
.Select(i => i.Item.Id)
.Distinct()
.ToArray();
}
protected override IEnumerable<(BaseItem Item, MediaSourceType MediaSourceType)> GetAllItemsForMediaSources()
{
var primary = PrimaryVersionId.HasValue