Remove ExtraIds column and use OwnerId relationship for extras

- Remove ExtraIds property from BaseItemEntity and BaseItem
- Update RefreshExtras to query via OwnerId instead of cached ExtraIds
- Update GetExtras methods to query database via OwnerIds filter
- Add OwnerIds and ExtraTypes filter support to InternalItemsQuery
- Add filter handling in BaseItemRepository for new query options
- Update HasSpecialFeature/HasTrailer filters to use Extras relationship
- Add CleanupOrphanedExtras migration routine
- Add database migration to drop ExtraIds column
This commit is contained in:
Shadowghost
2026-01-17 15:11:45 +01:00
parent 139d23ddc2
commit c350fd0f40
9 changed files with 1990 additions and 32 deletions

View File

@@ -39,6 +39,8 @@ namespace MediaBrowser.Controller.Entities
ImageTypes = Array.Empty<ImageType>();
IncludeItemTypes = Array.Empty<BaseItemKind>();
ItemIds = Array.Empty<Guid>();
OwnerIds = Array.Empty<Guid>();
ExtraTypes = Array.Empty<ExtraType>();
MediaTypes = Array.Empty<MediaType>();
OfficialRatings = Array.Empty<string>();
OrderBy = Array.Empty<(ItemSortBy, SortOrder)>();
@@ -133,6 +135,10 @@ namespace MediaBrowser.Controller.Entities
public Guid[] ItemIds { get; set; }
public Guid[] OwnerIds { get; set; }
public ExtraType[] ExtraTypes { get; set; }
public Guid[] ExcludeItemIds { get; set; }
public Guid? AdjacentTo { get; set; }