mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-09-26 00:27:25 +00:00
Remove unnecessary array allocation
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
This commit is contained in:
parent
5aa748058e
commit
54549cd5b5
1 changed files with 1 additions and 2 deletions
|
|
@ -1108,8 +1108,7 @@ namespace Emby.Server.Implementations.Dto
|
|||
}
|
||||
else
|
||||
{
|
||||
allExtras ??= item.GetExtras().ToArray();
|
||||
dto.LocalTrailerCount = allExtras.Count(i => i.ExtraType == ExtraType.Trailer);
|
||||
dto.LocalTrailerCount = (allExtras ?? item.GetExtras()).Count(i => i.ExtraType == ExtraType.Trailer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue