mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 14:08:44 -04:00
Merge pull request #2642 from mark-monteiro/fix-extras
Add missing null check when retrieving extras
(cherry picked from commit 425bd2b01b
)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
02cfa15582
commit
54efde4073
1 changed files with 2 additions and 1 deletions
|
@ -178,6 +178,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
[JsonIgnore]
|
||||
public int? TotalBitrate { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public ExtraType? ExtraType { get; set; }
|
||||
|
||||
|
@ -2883,7 +2884,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
public IEnumerable<BaseItem> GetExtras(IReadOnlyCollection<ExtraType> extraTypes)
|
||||
{
|
||||
return ExtraIds.Select(LibraryManager.GetItemById).Where(i => i != null && extraTypes.Contains(i.ExtraType.Value));
|
||||
return ExtraIds.Select(LibraryManager.GetItemById).Where(i => i?.ExtraType != null && extraTypes.Contains(i.ExtraType.Value));
|
||||
}
|
||||
|
||||
public IEnumerable<BaseItem> GetTrailers()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue